---

- name: Store facts given by configuration
  set_fact:
    bootstrap_expected_user: "{{ ansible_user }}"
    bootstrap_expected_become_pass: "{{ ansible_become_pass }}"

- name: Bootstrap shift if required
  include_tasks: try_else_shift.yml

- name: Privilege expected user
  include_tasks: privilege.yml

- name: Bootstrap shift back if was shifted
  include_tasks: shift_back.yml
  when: bootstrap_used

- name: Deprivilege bootstrap user
  include_tasks: deprivilege.yml
