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/shift_back.yml

16 lines
366 B
YAML

---
- name: Set variables for shifting back
set_fact:
bootstrap_used: no
ansible_user: '{{ bootstrap_expected_user }}'
ansible_become_pass: '{{ bootstrap_expected_become_pass }}'
- meta: reset_connection
- name: Reboot server proper disabling old user
reboot:
when:
- bootstrap_user != "root"
- bootstrap_user != bootstrap_expected_user