64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
---
|
|
# Configure Podman
|
|
|
|
- name: Install python3-cryptography
|
|
ansible.builtin.package:
|
|
name: python3-cryptography
|
|
state: present
|
|
|
|
- name: Ensure containers configuration directory exists
|
|
ansible.builtin.file:
|
|
path: /etc/containers
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
|
|
- name: Configure container registries
|
|
ansible.builtin.template:
|
|
src: registries.conf.j2
|
|
dest: "{{ podman_registries_conf_path }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
backup: true
|
|
when: podman_configure_registries
|
|
notify:
|
|
- restart podman
|
|
|
|
- name: Configure container storage
|
|
ansible.builtin.template:
|
|
src: storage.conf.j2
|
|
dest: "{{ podman_storage_conf_path }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
backup: true
|
|
when: podman_configure_storage
|
|
notify:
|
|
- restart podman
|
|
|
|
- name: Configure container policy
|
|
ansible.builtin.template:
|
|
src: policy.json.j2
|
|
dest: "{{ podman_policy_path }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
backup: true
|
|
when: podman_configure_policy
|
|
notify:
|
|
- restart podman
|
|
|
|
- name: Ensure storage directories exist
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
loop:
|
|
- "{{ podman_storage_runroot }}"
|
|
- "{{ podman_storage_graphroot }}"
|
|
when: podman_configure_storage
|