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