-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Molecule prepare updated, using become on tasks needed on role.
- Loading branch information
1 parent
be78625
commit 9be90e6
Showing
2 changed files
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
--- | ||
- name: Prepare playbook | ||
hosts: all | ||
become: false | ||
gather_facts: false | ||
|
||
tasks: | ||
- name: Install goodies (python3 & pip & gpg) for Debian OS-Family distros | ||
ansible.builtin.raw: grep -q "debian" /etc/*-release && apt update && apt install -y python3 python3-pip gpg | ||
- name: Install goodies (python3 & pip) for Debian OS-Family distros | ||
ansible.builtin.raw: grep -q "debian" /etc/*-release && apt-get update && apt-get install -y python3 python3-pip | ||
args: | ||
executable: /bin/bash | ||
ignore_errors: true | ||
register: result | ||
failed_when: | ||
- result.rc != 0 | ||
- result.stderr != "" | ||
changed_when: result.rc == 0 | ||
|
||
- name: Install sudo & gpg | ||
ansible.builtin.package: | ||
name: | ||
- sudo | ||
- gpg | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters