Skip to content

Commit

Permalink
major: used full qualified collection names
Browse files Browse the repository at this point in the history
  • Loading branch information
tboerger committed Feb 6, 2024
1 parent 0b998ed commit a9d1fe4
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v4

- name: Role linting
uses: actionhippie/ansible-later@v2
uses: actionhippie/ansible-later@v3

testing:
runs-on: ubuntu-latest
Expand Down
41 changes: 36 additions & 5 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,48 @@
gather_facts: False

tasks:
- name: Stat apt dir
register: aptdir
ansible.builtin.stat:
path: /var/lib/apt

- name: Wait for aptlock
shell: while fuser /var/lib/apt/lists/lock >/dev/null 2>&1; do echo 'Waiting for apt list lock.' && sleep 10; done
when: aptdir.stat.exists
changed_when: False
ansible.builtin.shell:
cmd: while fuser /var/lib/apt/lists/lock >/dev/null 2>&1; do echo 'Waiting for apt list lock.' && sleep 10; done

- name: Update package cache
apt:
when: aptdir.stat.exists
ansible.builtin.apt:
update_cache: True

- name: Install gpg dependency
apt:
name: python3-gpg
- name: Install test dependencies
when: aptdir.stat.exists
loop:
- python3-gpg
- curl
ansible.builtin.apt:
name: "{{ item }}"
state: present

- name: Create man dirs
changed_when: False
loop:
- /usr/share/man/man1
- /usr/share/man/man2
- /usr/share/man/man3
- /usr/share/man/man4
- /usr/share/man/man5
- /usr/share/man/man6
- /usr/share/man/man7
- /usr/share/man/man8
- /usr/share/man/man9
ansible.builtin.file:
path: "{{ item }}"
owner: root
group: root
mode: u=rwx,g=rx,o=rx
state: directory

...
2 changes: 1 addition & 1 deletion tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
loop: "{{ base_debian_packages + base_debian_additional }}"
loop_control:
loop_var: pkg
package:
ansible.builtin.package:
name: "{{ pkg }}"
state: present
tags:
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Include OS tasks
include_tasks: "{{ item }}"
ansible.builtin.include_tasks: "{{ item }}"
with_first_found:
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
- "{{ ansible_distribution | lower }}.yml"
Expand Down
2 changes: 1 addition & 1 deletion tasks/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
loop: "{{ base_ubuntu_packages + base_ubuntu_additional }}"
loop_control:
loop_var: pkg
package:
ansible.builtin.package:
name: "{{ pkg }}"
state: present
tags:
Expand Down

0 comments on commit a9d1fe4

Please sign in to comment.