Skip to content

Commit

Permalink
various: ensure /etc/apt/keyrings exists prior to using it for signin…
Browse files Browse the repository at this point in the history
…g keys
  • Loading branch information
saltydk committed Jul 3, 2024
1 parent b8e90c8 commit 1d81bb5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
10 changes: 9 additions & 1 deletion roles/docker/tasks/subtasks/binary/binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@
ansible.builtin.apt:
update_cache: yes

- name: Binary | Add official gpg signing key to trusted.gpg.d
- name: Binary | Ensure '/etc/apt/keyrings' exists
ansible.builtin.file:
path: "/etc/apt/keyrings"
state: directory
mode: "0755"
owner: "root"
group: "root"

- name: Binary | Add official gpg signing key to '/etc/apt/keyrings'
ansible.builtin.get_url:
url: "{{ docker_apt_key_url }}"
dest: /etc/apt/keyrings/docker.asc
Expand Down
8 changes: 8 additions & 0 deletions roles/mainline/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
ansible.builtin.apt:
update_cache: yes

- name: Ensure '/etc/apt/keyrings' exists
ansible.builtin.file:
path: "/etc/apt/keyrings"
state: directory
mode: "0755"
owner: "root"
group: "root"

- name: Add gpg signing key to '/etc/apt/keyrings'
ansible.builtin.get_url:
url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3AE27527713D2479DCAFFD58A89D7C1B2F76304D
Expand Down
8 changes: 8 additions & 0 deletions roles/python/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@
ansible.builtin.apt:
update_cache: yes

- name: Ensure '/etc/apt/keyrings' exists
ansible.builtin.file:
path: "/etc/apt/keyrings"
state: directory
mode: "0755"
owner: "root"
group: "root"

- name: Add gpg signing key to '/etc/apt/keyrings'
ansible.builtin.get_url:
url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776
Expand Down

0 comments on commit 1d81bb5

Please sign in to comment.