refs #7593 Clean task reorganized
This commit is contained in:
parent
e9a9cf7be0
commit
8a907de796
|
@ -2,38 +2,46 @@
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
tasks:
|
||||||
- name: Delete awx-user
|
|
||||||
user:
|
- name: Delete old awx-user and it's configuration
|
||||||
name: awx-user
|
block:
|
||||||
state: absent
|
- name: Delete awx-user
|
||||||
remove: yes
|
tags: awx
|
||||||
tags: awx
|
user:
|
||||||
- name: Delete awx-user sudoers file
|
name: awx-user
|
||||||
file:
|
state: absent
|
||||||
path: /etc/sudoers.d/awx-user
|
remove: yes
|
||||||
state: absent
|
- name: Delete awx-user sudoers file
|
||||||
tags: awx
|
tags: awx
|
||||||
|
file:
|
||||||
|
path: /etc/sudoers.d/awx-user
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Delete old MOTD configuration
|
- name: Delete old MOTD configuration
|
||||||
|
tags: motd
|
||||||
file:
|
file:
|
||||||
path: /etc/profile.d/mymotd.sh
|
path: /etc/profile.d/mymotd.sh
|
||||||
state: absent
|
state: absent
|
||||||
tags: motd
|
|
||||||
- name: Delete old Ansible bashrc configuration
|
- name: Delete old profile configuration
|
||||||
blockinfile:
|
tags: profile
|
||||||
path: /root/.bashrc
|
block:
|
||||||
marker_begin: 'BEGIN ANSIBLE MANAGED BLOCK'
|
- name: Delete old Ansible bashrc configuration
|
||||||
marker_end: 'END ANSIBLE MANAGED BLOCK'
|
blockinfile:
|
||||||
marker: "# {mark}"
|
path: /root/.bashrc
|
||||||
state: absent
|
marker_begin: 'BEGIN ANSIBLE MANAGED BLOCK'
|
||||||
tags: bashrc
|
marker_end: 'END ANSIBLE MANAGED BLOCK'
|
||||||
- name: Delete old custom bashrc configuration
|
marker: "# {mark}"
|
||||||
replace:
|
state: absent
|
||||||
path: /root/.bashrc
|
- name: Delete old custom bashrc configuration
|
||||||
regexp: '{{ start_delimiter }}\\s\\S*?{{ end_delimiter }}'
|
replace:
|
||||||
replace: ''
|
path: /root/.bashrc
|
||||||
vars:
|
regexp: '{{ start_delimiter }}\\s\\S*?{{ end_delimiter }}'
|
||||||
start_delimiter: '### 4Loo'
|
replace: ''
|
||||||
end_delimiter: 'esac'
|
vars:
|
||||||
|
start_delimiter: '### 4Loo'
|
||||||
|
end_delimiter: 'esac'
|
||||||
|
|
||||||
- name: Delete old vn-host package
|
- name: Delete old vn-host package
|
||||||
tags: vn-host
|
tags: vn-host
|
||||||
block:
|
block:
|
||||||
|
|
Loading…
Reference in New Issue