Commit 17a88ab4 authored by Louis VINCHON's avatar Louis VINCHON
Browse files

Role irods: factorize common tasks under the 'common' folder

Any task that is not OS-specific is moved to the 'common' folder.
parent 89961d00
---
- import_tasks: group_user.yml
- import_tasks: ../common/group_user.yml
- import_tasks: repos.yml
- import_tasks: packages.yml
- import_tasks: security.yml
- import_tasks: pip.yml
- import_tasks: irods_config.yml
- import_tasks: ../common/pip.yml
- import_tasks: ../common/irods_config.yml
...
---
- name: Create UNIX iRODS group
group:
name: "{{ irods_unix_group_name }}"
gid: "{{ irods_unix_group_id }}"
state: present
- name: Create UNIX iRODS user
user:
name: "{{ irods_unix_user_name }}"
uid: "{{ irods_unix_user_id }}"
group: irods
state: present
password: "{{irods_unix_password}}"
#password: see docs.ansible.com/ansible/latest/user_module.html
...
---
- name: Template server_config.json file
template:
src: templates/irods_setup.json.j2
dest: /tmp/irods_setup.json
- name: Execute setup_irods.py script
command: /usr/bin/python setup_irods.py --json_configuration_file=/tmp/irods_setup.json
args:
chdir: /var/lib/irods/scripts
creates: /etc/irods/server_config.json
...
---
- import_tasks: group_user.yml
- import_tasks: pip.yml
- import_tasks: irods_config.yml
- import_tasks: ../common/group_user.yml
- import_tasks: ../common/pip.yml
- import_tasks: ../common/irods_config.yml
...
---
- name: Install python modules
pip:
name:
- pip
- psycopg2-binary
state: latest
...
---
- name: Create UNIX iRODS group
group:
name: "{{ irods_unix_group_name }}"
gid: "{{ irods_unix_group_id }}"
state: present
- name: Create UNIX iRODS user
user:
name: "{{ irods_unix_user_name }}"
uid: "{{ irods_unix_user_id }}"
group: irods
state: present
password: "{{irods_unix_password}}"
#password: see docs.ansible.com/ansible/latest/user_module.html
...
---
- name: Template server_config.json file
template:
src: templates/irods_setup.json.j2
dest: /tmp/irods_setup.json
- name: Execute setup_irods.py script
command: /usr/bin/python setup_irods.py --json_configuration_file=/tmp/irods_setup.json
args:
chdir: /var/lib/irods/scripts
creates: /etc/irods/server_config.json
...
---
- import_tasks: group_user.yml
- import_tasks: ../common/group_user.yml
- import_tasks: repos.yml
- import_tasks: packages.yml
- import_tasks: pip.yml
- import_tasks: irods_config.yml
- import_tasks: ../common/pip.yml
- import_tasks: ../common/irods_config.yml
...
---
- name: Install python modules
pip:
name:
- pip
- psycopg2-binary
state: latest
...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment