2023-09-08 20:41:09 +00:00
|
|
|
- name: "Create conatiners folder"
|
|
|
|
file:
|
|
|
|
path: "{{ podman_containers_config }}"
|
|
|
|
state: directory
|
|
|
|
mode: 'u=rwx,g=rx,o='
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Create config and data directory"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
|
|
|
with_items:
|
|
|
|
- "{{ podman_containers_config }}"
|
|
|
|
- "{{ podman_containers_config }}/registries.conf.d"
|
|
|
|
|
|
|
|
- name: Copy policy.json
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: policy.json
|
|
|
|
dest: "{{ podman_containers_config }}/policy.json"
|
|
|
|
mode: 0600
|
|
|
|
|
|
|
|
- name: Copy registries.json
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: registries.conf
|
|
|
|
dest: "{{ podman_containers_config }}/registries.conf"
|
|
|
|
mode: 0600
|
|
|
|
|
2023-09-11 20:23:53 +00:00
|
|
|
- name: Copy registries.json
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: containers.conf
|
|
|
|
dest: "{{ podman_containers_config }}/containers.conf"
|
|
|
|
mode: 0600
|
|
|
|
|
2023-09-08 20:41:09 +00:00
|
|
|
- name: "Create registries.conf.d folder"
|
|
|
|
file:
|
|
|
|
path: "{{ podman_containers_config }}/registries.conf.d"
|
|
|
|
state: directory
|
|
|
|
mode: 'u=rwx,g=rx,o='
|
|
|
|
|
|
|
|
|
|
|
|
- name: Copy registries.json
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: registries.conf.d/shortnames.conf
|
|
|
|
dest: "{{ podman_containers_config }}/registries.conf.d/shortnames.conf"
|
|
|
|
mode: 0600
|
2023-09-11 20:23:53 +00:00
|
|
|
|
|
|
|
- name: Add podman folder to $PATH
|
|
|
|
ansible.builtin.copy:
|
|
|
|
dest: /etc/profile.d/podman.sh
|
|
|
|
content: 'PATH=$PATH:/usr/libexec/podman'
|