mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-11-10 13:44:16 +00:00
chore(barad-dur): general maintenance
- added tags - fixed file modes - seperate container pulling and starting
This commit is contained in:
parent
fdcb1c23ff
commit
abcc898254
1 changed files with 21 additions and 5 deletions
|
@ -4,16 +4,19 @@
|
|||
user:
|
||||
name: "{{ barad_dur_user }}"
|
||||
state: present
|
||||
system: yes
|
||||
system: true
|
||||
register: barad_dur_user_res
|
||||
tags: [ 'prepare', 'prepare-barad_dur',
|
||||
'deploy', 'deploy-barad_dur' ]
|
||||
|
||||
- name: Ensure host directories are present [{{ barad_dur_base_path }}]
|
||||
- name: Create base-directory for barad-dur [{{ barad_dur_base_path }}]
|
||||
file:
|
||||
path: "{{ barad_dur_base_path }}"
|
||||
state: directory
|
||||
owner: "{{ barad_dur_user_res.uid }}"
|
||||
group: "{{ barad_dur_user_res.group }}"
|
||||
mode: 0750
|
||||
mode: "0755"
|
||||
tags: [ 'prepare', 'prepare-barad_dur' ]
|
||||
|
||||
- name: Template configuration file for barad-dur [{{ barad_dur_config_file }}]
|
||||
template:
|
||||
|
@ -21,8 +24,21 @@
|
|||
dest: "{{ barad_dur_config_file }}"
|
||||
owner: "{{ barad_dur_user_res.uid }}"
|
||||
group: "{{ barad_dur_user_res.group }}"
|
||||
mode: 0750
|
||||
mode: "0640"
|
||||
notify: restart-barad-dur
|
||||
tags: [ 'deploy', 'deploy-barad_dur' ]
|
||||
|
||||
- name: Pull barad-dur container
|
||||
docker_image:
|
||||
name: "{{ barad_dur_container_image_reference }}"
|
||||
source: pull
|
||||
state: present
|
||||
force_source: "{{ barad_dur_container_force_pull }}"
|
||||
register: barad_dur_container_image_pulled
|
||||
until: barad_dur_container_image_pulled is success
|
||||
retries: 10
|
||||
delay: 5
|
||||
tags: [ 'prepare', 'prepare-barad_dur' ]
|
||||
|
||||
- name: Start barad-dur container
|
||||
docker_container:
|
||||
|
@ -35,4 +51,4 @@
|
|||
volumes: "{{ barad_dur_container_volumes }}"
|
||||
restart_policy: "{{ barad_dur_container_restart_policy }}"
|
||||
state: "{{ barad_dur_container_state }}"
|
||||
pull: true
|
||||
tags: [ 'deploy', 'deploy-barad_dur' ]
|
||||
|
|
Loading…
Reference in a new issue