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/roles/bootstrap/tasks/deprivilege.yml

14 lines
283 B
YAML

---
- name: Reset connection to remove privileged user
meta: reset_connection
- name: Remove temporary privileged user
user:
name: "{{ bootstrap_user }}"
state: absent
become: yes
when:
- bootstrap_user != "root"
- bootstrap_user != bootstrap_expected_user