Skip to content

Commit

Permalink
Also see if sudo is available.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Sep 19, 2022
1 parent a11c665 commit ee145a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
timeout: "{{ bootstrap_timeout }}"
register: bootstrap_connect
changed_when: no
- name: Test sudo
ansible.builtin.command:
cmd: sudo --version
rescue:
- name: Gather bootstrap facts
ansible.builtin.include_tasks:
Expand All @@ -36,7 +39,7 @@
bootstrap_os_family in [ "Alpine", "Archlinux", "Gentoo" ]) or
(bootstrap_install.stdout_regex not in bootstrap_install_packages.stdout and
bootstrap_os_family in [ "Debian", "RedHat", "Rocky", "Suse" ])
# At this stage, python and sudo are not installed, `become` can't be used.
# At this stage, python and/or sudo are not installed, `become` can't be used.
become: no

- name: Gather ansible facts
Expand Down

0 comments on commit ee145a1

Please sign in to comment.