Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
poc_irods
poc-irods
Commits
07cb3f8e
Commit
07cb3f8e
authored
Nov 10, 2020
by
viscapi
Browse files
Translated all strings to English
parent
0dcbd068
Changes
15
Hide whitespace changes
Inline
Side-by-side
iRODS/tasks/group_user.yml
View file @
07cb3f8e
---
-
name
:
Cr
é
at
ion group
e UNIX iRODS
-
name
:
Cr
e
ate UNIX iRODS
group
group
:
name
:
"
{{
irods_unix_group_name
}}"
gid
:
"
{{
irods_unix_group_id
}}"
state
:
present
-
name
:
Cr
éation utilis
ate
ur
UNIX iRODS
-
name
:
Cr
e
ate UNIX iRODS
user
user
:
name
:
"
{{
irods_unix_user_name
}}"
uid
:
"
{{
irods_unix_user_id
}}"
group
:
irods
state
:
present
password
:
"
{{irods_unix_password}}"
#password:
voir
docs.ansible.com/ansible/latest/user_module.html
#password:
see
docs.ansible.com/ansible/latest/user_module.html
...
iRODS/tasks/irods_config.yml
View file @
07cb3f8e
---
-
name
:
Template
du fichier
server_config.json
-
name
:
Template server_config.json
file
template
:
src
:
templates/irods_setup.json.j2
dest
:
/tmp/irods_setup.json
-
name
:
On vérifie qu'iRODS n'a pas déjà été configuré
-
name
:
Check that iRODS hasn't been configured before
stat
:
path
:
/etc/irods/server_config.json
register
:
config
-
name
:
Ex
é
cut
ion du script
setup_irods.py
-
name
:
Ex
e
cut
e
setup_irods.py
script
command
:
/usr/bin/python setup_irods.py --json_configuration_file=/tmp/irods_setup.json
args
:
chdir
:
/var/lib/irods/scripts
...
...
iRODS/tasks/main.yml
View file @
07cb3f8e
---
# Version Ansible de: https://redmine.pallas.cines.fr/projects/admin_dad/wiki/Installation_manuelle_d'iRODS_42x
-
import_tasks
:
group_user.yml
-
import_tasks
:
repos.yml
-
import_tasks
:
packages.yml
...
...
iRODS/tasks/packages.yml
View file @
07cb3f8e
---
# Installation paquets iRODS + divers
-
name
:
Installation paquets iRODS et divers
-
name
:
Install iRODS packages and misc.
yum
:
conf_file
:
'
/etc/yum.conf'
name
:
...
...
iRODS/tasks/pip.yml
View file @
07cb3f8e
---
-
name
:
Install
ation des
modules
python
-
name
:
Install
python
modules
pip
:
name
:
-
pip
...
...
iRODS/tasks/repos.yml
View file @
07cb3f8e
---
## Ajout des dépôts iRODS
-
name
:
Ajout de la clé pour dépôt iRODS
-
name
:
Add key for iRODS repository
rpm_key
:
state
:
present
key
:
https://packages.irods.org/irods-signing-key.asc
validate_certs
:
yes
# validate_certs nécessaire ?
# TODO: gpgcheck et repo_gpgcheck off pour éviter problèmes, à régler /!\
-
name
:
Récupération dépôt iRODS
-
name
:
Add iRODS repository
yum_repository
:
description
:
RENCI iRODS Repository
name
:
irods
...
...
iRODS/tasks/security.yml
View file @
07cb3f8e
---
-
name
:
On vérifie que le mode SELinux est enforcing
-
name
:
Set SELinux mode
selinux
:
policy
:
targeted
state
:
"
{{
selinux_mode
}}"
...
...
postgresql/tasks/db_init.yml
View file @
07cb3f8e
---
-
name
:
On vérifie que la base n'existe pas déjà sur
CentOS
-
name
:
Check that the database doesn't exist yet on
CentOS
stat
:
path
:
"
{{path_to_icat}}/postgresql.conf"
register
:
stat_result_centos
when
:
ansible_facts['distribution'] == "CentOS"
-
name
:
On vérifie que la base n'existe pas déjà sur
Debian
-
name
:
Check that the database doesn't exist yet on
Debian
stat
:
path
:
"
/etc/postgresql/{{
postgresql_version.version.major
}}/{{
cluster_name
}}/postgresql.conf"
register
:
stat_result_debian
when
:
ansible_facts['distribution'] == "Debian"
-
name
:
Initiali
s
ation
de la base de données ICAT sur
CentOS
7
-
name
:
Initiali
z
ation
of ICAT database on
CentOS
7
command
:
/usr/pgsql-9.6/bin/initdb -D {{path_to_icat}}
become
:
true
become_user
:
postgres
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and stat_result_centos.stat.exists == False)
-
name
:
Initiali
s
ation
de la base de données ICAT sur
CentOS
8
-
name
:
Initiali
z
ation
of ICAT database on
CentOS
8
command
:
/usr/bin/initdb -D {{path_to_icat}}
become
:
true
become_user
:
postgres
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and stat_result_centos.stat.exists == False)
-
name
:
Initiali
s
ation
de la base de données ICAT sur
Debian
10
-
name
:
Initiali
z
ation
of ICAT database on
Debian
10
command
:
/usr/bin/pg_createcluster -d {{ path_to_icat }} {{ postgresql_version.version.major }} {{ cluster_name }}
become
:
true
become_user
:
postgres
...
...
postgresql/tasks/db_privs.yml
View file @
07cb3f8e
...
...
@@ -6,7 +6,7 @@
password
:
"
{{
database_password
}}"
login_user
:
postgres
login_unix_socket
:
/tmp
# login_unix_socket
nécessaire (sinon va chercher dans
/var/run/postgresql)
# login_unix_socket
mandatory (else looks it up in
/var/run/postgresql)
-
postgresql_db
:
name
:
"
{{
database_name
}}"
...
...
postgresql/tasks/packages.yml
View file @
07cb3f8e
---
-
name
:
Install
ation paquets
PostgreSQL 9.6 po
u
r CentOS
7
-
name
:
Install PostgreSQL 9.6 p
ackages f
or CentOS
7
yum
:
conf_file
:
'
/etc/yum.conf'
name
:
...
...
@@ -12,7 +12,7 @@
state
:
present
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
-
name
:
Install
ation paquets
PostgreSQL 10.6 po
u
r CentOS
8
-
name
:
Install PostgreSQL 10.6 p
ackages f
or CentOS
8
dnf
:
conf_file
:
'
/etc/dnf/dnf.conf'
name
:
...
...
postgresql/tasks/patches.yml
View file @
07cb3f8e
---
-
name
:
c
onfigur
ation adresse d'écoute PostgreSQL
-
name
:
C
onfigur
e PostgreSQL listen address
lineinfile
:
path
:
"
{{
path_to_icat
}}/postgresql.conf"
regexp
:
'
^#listen_addresses
='
...
...
@@ -8,7 +8,7 @@
backrefs
:
yes
backup
:
yes
-
name
:
autori
s
ation
dans
pg_hba.conf
-
name
:
Set
autori
z
ation
in
pg_hba.conf
postgresql_pg_hba
:
dest
:
"
{{
path_to_icat
}}/pg_hba.conf"
databases
:
"
{{
database_name
}}"
...
...
@@ -17,12 +17,4 @@
contype
:
host
method
:
trust
#- name: autorisation dans pg_hba.conf
# lineinfile:
# path: "{{ path_to_icat }}/pg_hba.conf"
# insertbefore: '^# Allow replication connections from localhost'
# line: 'host {{ database_name }} {{ database_user }} {{ irods_server }}/24 trust'
# #backrefs: yes
# backup: yes
...
postgresql/tasks/repos.yml
View file @
07cb3f8e
---
-
name
:
Install
ation du dépôt
PostgreSQL
9.6
-
name
:
Install PostgreSQL 9.6
packages for CentOS
7
yum
:
conf_file
:
'
/etc/yum.conf'
name
:
https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
...
...
postgresql/tasks/security.yml
View file @
07cb3f8e
...
...
@@ -4,10 +4,6 @@
policy
:
targeted
state
:
"
{{
selinux_mode
}}"
#- name:
# debug:
# var: "{{ path_to_icat | splitext }}"
-
name
:
Allow PostgreSQL to modify files in "{{ path_to_icat }}"
sefcontext
:
target
:
'
{{
path_to_icat
}}(/.*)?'
...
...
postgresql/tasks/systemd.yml
View file @
07cb3f8e
---
# Activation du service postgresql-9.6 pour CentOS 7
-
name
:
Activation du service postgresql-9.6 pour CentOS
7
-
name
:
Activate postgresql-9.6 service for CentOS
7
systemd
:
enabled
:
yes
name
:
postgresql-9.6
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
-
name
:
Activat
ion du servic
e postgresql
pou
r CentOS
8
-
name
:
Activate postgresql
service fo
r CentOS
8
systemd
:
enabled
:
yes
name
:
postgresql
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
# Modification de la variable PGDATA dans /usr/lib/systemd/system/postgresql-9.6.service
-
lineinfile
:
path
:
/usr/lib/systemd/system/postgresql-9.6.service
regexp
:
'
^Environment=PGDATA='
...
...
@@ -28,21 +24,17 @@
line
:
'
Environment=PGDATA={{path_to_icat}}'
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
# On recharge l'environnememnt
-
name
:
Rechargement de l'environnement
-
name
:
Reload systemd daemon
systemd
:
daemon_reload
:
yes
# Démarrage du service postgresql-9.6
-
name
:
Démarrage du service postgresql-9.6
-
name
:
Start postgresql-9.6 service on CentOS
7
systemd
:
name
:
postgresql-9.6
state
:
started
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
-
name
:
Démarrage du service postgresql
-
name
:
Start postgresql service on CentOS
8
systemd
:
name
:
postgresql
state
:
started
...
...
postgresql/tasks/users.yml
View file @
07cb3f8e
---
-
name
:
Cr
é
at
ion group
e UNIX iRODS
-
name
:
Cr
e
ate UNIX iRODS
group
group
:
name
:
"
{{
irods_unix_group_name
}}"
gid
:
"
{{
irods_unix_group_id
}}"
state
:
present
-
name
:
Cr
éation utilis
ate
ur
UNIX iRODS
-
name
:
Cr
e
ate UNIX iRODS
user
user
:
name
:
"
{{
irods_unix_user_name
}}"
uid
:
"
{{
irods_unix_user_id
}}"
...
...
@@ -15,15 +15,15 @@
password
:
"
{{irods_unix_password}}"
#password: voir docs.ansible.com/ansible/latest/user_module.html
-
name
:
Cr
é
at
ion groupe et utilisateur postgres
-
name
:
Cr
e
at
e postgres user and group on CentOS
7
block
:
-
name
:
Cr
é
at
ion group
e UNIX postgres
-
name
:
Cr
e
ate UNIX postgres
group
group
:
name
:
"
{{
postgresql_unix_group_name
}}"
state
:
present
system
:
yes
-
name
:
Cr
é
at
ion utilisateur
postgres
-
name
:
Cr
e
at
e UNIX
postgres
user
user
:
name
:
"
{{
postgresql_unix_user_name
}}"
group
:
"
{{
postgresql_unix_group_name
}}"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment