refs #7593 Clean task reorganized

This commit is contained in:
Juan Ferrer 2025-02-06 08:05:53 +01:00
parent e9a9cf7be0
commit 8a907de796
1 changed files with 36 additions and 28 deletions

View File

@ -2,22 +2,30 @@
hosts: all hosts: all
gather_facts: no gather_facts: no
tasks: tasks:
- name: Delete old awx-user and it's configuration
block:
- name: Delete awx-user - name: Delete awx-user
tags: awx
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
tags: awx
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 - 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 profile configuration
tags: profile
block:
- name: Delete old Ansible bashrc configuration - name: Delete old Ansible bashrc configuration
blockinfile: blockinfile:
path: /root/.bashrc path: /root/.bashrc
@ -25,7 +33,6 @@
marker_end: 'END ANSIBLE MANAGED BLOCK' marker_end: 'END ANSIBLE MANAGED BLOCK'
marker: "# {mark}" marker: "# {mark}"
state: absent state: absent
tags: bashrc
- name: Delete old custom bashrc configuration - name: Delete old custom bashrc configuration
replace: replace:
path: /root/.bashrc path: /root/.bashrc
@ -34,6 +41,7 @@
vars: vars:
start_delimiter: '### 4Loo' start_delimiter: '### 4Loo'
end_delimiter: 'esac' end_delimiter: 'esac'
- name: Delete old vn-host package - name: Delete old vn-host package
tags: vn-host tags: vn-host
block: block: