replace when by tag specific
This commit is contained in:
parent
18da14f2de
commit
62af6912cd
@ -9,7 +9,6 @@
|
||||
ansible_become: yes
|
||||
ansible_become_method: sudo
|
||||
ansible_become_password: "{{ sudo_password }}"
|
||||
when: script is not defined
|
||||
|
||||
- name: Template virtualhost
|
||||
template:
|
||||
@ -20,7 +19,7 @@
|
||||
ansible_become: yes
|
||||
ansible_become_method: sudo
|
||||
ansible_become_password: "{{ sudo_password }}"
|
||||
when: script is not defined or script == "blacklist"
|
||||
tags: [ "configure_blacklist" ]
|
||||
|
||||
- name: Copy blacklist
|
||||
copy:
|
||||
@ -33,17 +32,17 @@
|
||||
ansible_become: yes
|
||||
ansible_become_method: sudo
|
||||
ansible_become_password: "{{ sudo_password }}"
|
||||
tags: [ "restore" ]
|
||||
tags: [ "restore_blacklist" ]
|
||||
|
||||
- name: Deploy stats script
|
||||
import_tasks: stats.yml
|
||||
when: script is not defined or script == "stats"
|
||||
tags: [ "configure_stats" ]
|
||||
|
||||
- name: Configure blacklist script
|
||||
import_tasks: blacklist.yml
|
||||
when: script is not defined or script == "blacklist"
|
||||
tags: [ "configure_blacklist" ]
|
||||
|
||||
- name: Configure supervision script
|
||||
import_tasks: supervision.yml
|
||||
when: script is not defined or script == "supervision"
|
||||
tags: [ "configure_supervision" ]
|
||||
|
||||
|
@ -2,23 +2,21 @@
|
||||
fetch:
|
||||
src: /etc/sentinel/blacklist
|
||||
dest: blacklist
|
||||
when: script is not defined or script == "blacklist"
|
||||
tags: [ "backup" ]
|
||||
tags: [ "backup_balcklist" ]
|
||||
|
||||
|
||||
- name: Deconfigure stats script
|
||||
import_tasks: deconfigure_stats.yml
|
||||
when: script is not defined or script == "stats"
|
||||
tags: [ "deconfigure_stats" ]
|
||||
|
||||
- name: Deconfigure blacklist script
|
||||
import_tasks: deconfigure_blacklist.yml
|
||||
when: script is not defined or script == "blacklist"
|
||||
|
||||
tags: [ "deconfigure_blacklist" ]
|
||||
|
||||
|
||||
- name: Deconfigure supervision script
|
||||
import_tasks: deconfigure_supervision.yml
|
||||
when: script is not defined or script == "supervision"
|
||||
tags: [ "deconfigure_supervision" ]
|
||||
|
||||
- name: Remove sentinel directory
|
||||
file:
|
||||
@ -31,4 +29,3 @@
|
||||
ansible_become: yes
|
||||
ansible_become_method: sudo
|
||||
ansible_become_password: "{{ sudo_password }}"
|
||||
when: script is not defined
|
||||
|
Loading…
x
Reference in New Issue
Block a user