Skip to content

Commit

Permalink
pretask before nginx role, with apt and update_cache option
Browse files Browse the repository at this point in the history
  • Loading branch information
loraine-gueguen committed Aug 1, 2024
1 parent ae3acce commit 06814fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ driver:
name: docker
platforms:
- name: instance
image: "ubuntu:20.04"
image: "ubuntu-${MOLECULE_DISTRO:-rockylinux9}:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
4 changes: 3 additions & 1 deletion tasks/install.dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
# NGINX

- name: Install needed package to fix update_cache failure.
package:
ansible.builtin.apt:
name:
- apt-transport-https
- dirmngr
- ca-certificates
- gnupg
- gpg-agent
update_cache: true
state: latest
- name: Update apt cache.
apt: update_cache=true cache_valid_time=600
when: ansible_os_family == 'Debian'
Expand Down

0 comments on commit 06814fc

Please sign in to comment.