Skip to content

Commit

Permalink
Fix podman role registry var names
Browse files Browse the repository at this point in the history
Initially it has been merged with private_registry and
private_registry_ca - let's change it to podman_registry
and podman_registry_ca to conform with a rule that vars
should be named with role name.

Change-Id: If6b2898d90b9f51d308ce2f7010084a896afa708
  • Loading branch information
mnasiadka committed Oct 31, 2023
1 parent c0e65d1 commit 0ca12aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions roles/podman/defaults/main.yml
Expand Up @@ -12,8 +12,8 @@ podman_runtime_directory:

# Podman can work with docker registries so it can stay this way
# URL of private registry
private_registry:
private_registry_insecure: false
podman_registry:
podman_registry_insecure: false

# Path to a CA file for Docker registry
private_registry_ca:
podman_registry_ca:
18 changes: 9 additions & 9 deletions roles/podman/tasks/config.yml
Expand Up @@ -15,13 +15,13 @@
vars:
registry: |
[[registry]]
location = "{{ private_registry }}"
insecure = {{ private_registry_insecure | bool }}
location = "{{ podman_registry }}"
insecure = {{ podman_registry_insecure | bool }}
copy:
content: "{{ registry }}"
dest: /etc/containers/registries.conf.d/registries.conf
mode: 0644
when: private_registry is not none
when: podman_registry is not none

- name: Write storage config
become: True
Expand All @@ -39,17 +39,17 @@
mode: 0644
when: podman_storage_driver is not none or podman_runtime_directory is not none

- name: Ensure the path for CA file for private registry exists
- name: Ensure the path for CA file for podman registry exists
file:
path: "/etc/containers/certs.d/{{ private_registry }}"
path: "/etc/containers/certs.d/{{ podman_registry }}"
owner: root
group: root
mode: 0700
state: directory
become: True
when:
- private_registry is not none
- private_registry_ca is not none
- podman_registry is not none
- podman_registry_ca is not none

- name: Ensure the CA file for private registry exists
copy:
Expand All @@ -60,5 +60,5 @@
mode: 0600
become: True
when:
- private_registry is not none
- private_registry_ca is not none
- podman_registry is not none
- podman_registry_ca is not none

0 comments on commit 0ca12aa

Please sign in to comment.