refs #8025 clean: tags added, added task to remove old bashrc config
This commit is contained in:
parent
77616531ab
commit
3f647cfd5c
|
@ -3,11 +3,34 @@
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
tasks:
|
||||||
- name: Delete awx-user
|
- name: Delete awx-user
|
||||||
ansible.builtin.user:
|
user:
|
||||||
name: awx-user
|
name: awx-user
|
||||||
state: absent
|
state: absent
|
||||||
remove: yes
|
remove: yes
|
||||||
|
tags: [awx]
|
||||||
- name: Delete awx-user sudoers file
|
- name: Delete awx-user sudoers file
|
||||||
file:
|
file:
|
||||||
path: /etc/sudoers.d/awx-user
|
path: /etc/sudoers.d/awx-user
|
||||||
state: absent
|
state: absent
|
||||||
|
tags: [awx]
|
||||||
|
- name: Delete old MOTD configuration
|
||||||
|
file:
|
||||||
|
path: /etc/profile.d/mymotd.sh
|
||||||
|
state: absent
|
||||||
|
tags: [motd]
|
||||||
|
- name: Delete old Ansible bashrc configuration
|
||||||
|
blockinfile:
|
||||||
|
path: /root/.bashrc
|
||||||
|
marker_begin: 'BEGIN ANSIBLE MANAGED BLOCK'
|
||||||
|
marker_end: 'END ANSIBLE MANAGED BLOCK'
|
||||||
|
marker: "# {mark}"
|
||||||
|
state: absent
|
||||||
|
tags: [bashrc]
|
||||||
|
- name: Delete old custom bashrc configuration
|
||||||
|
replace:
|
||||||
|
path: /root/.bashrc
|
||||||
|
regexp: '{{ start_delimiter }}[\\s\\S]*?{{ end_delimiter }}'
|
||||||
|
replace: ''
|
||||||
|
vars:
|
||||||
|
start_delimiter: '### 4Loo'
|
||||||
|
end_delimiter: 'esac'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- name: Install packages
|
- name: Install vim packages
|
||||||
apt:
|
apt:
|
||||||
name: vim
|
name: vim
|
||||||
state: present
|
state: present
|
||||||
|
|
Loading…
Reference in New Issue