You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/become_unprivileged/common_remote_group/cleanup.yml

36 lines
806 B
YAML

- name: Cleanup (as root)
hosts: ssh
gather_facts: yes
remote_user: root
tasks:
- name: Remove group for unprivileged users
group:
name: commongroup
state: absent
- name: Check if /usr/bin/setfacl exists
stat:
path: /usr/bin/setfacl
register: usr_bin_setfacl
- name: Check if /bin/setfacl exists
stat:
path: /bin/setfacl
register: bin_setfacl
- name: Set path to setfacl
set_fact:
setfacl_path: /usr/bin/setfacl
when: usr_bin_setfacl.stat.exists
- name: Set path to setfacl
set_fact:
setfacl_path: /bin/setfacl
when: bin_setfacl.stat.exists
- name: chmod +x setfacl
file:
path: "{{ setfacl_path }}"
mode: a+x
when: setfacl_path is defined