2023-09-08 20:41:09 +00:00
|
|
|
- name: "Create conatiners folder"
|
|
|
|
file:
|
|
|
|
path: "{{ podman_containers_config }}"
|
|
|
|
state: directory
|
2023-09-13 21:40:39 +00:00
|
|
|
mode: '755'
|
|
|
|
|
|
|
|
- name: "Create conatiners folder"
|
|
|
|
file:
|
|
|
|
path: "/etc/containers"
|
|
|
|
state: directory
|
|
|
|
mode: '755'
|
2023-09-08 20:41:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
- name: "Create config and data directory"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
2023-09-13 21:40:39 +00:00
|
|
|
mode: '755'
|
2023-09-08 20:41:09 +00:00
|
|
|
with_items:
|
|
|
|
- "{{ podman_containers_config }}"
|
|
|
|
- "{{ podman_containers_config }}/registries.conf.d"
|
2023-09-13 21:40:39 +00:00
|
|
|
- "/etc/containers/registries.conf.d"
|
2023-09-08 20:41:09 +00:00
|
|
|
|
|
|
|
- name: Copy policy.json
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: policy.json
|
2023-09-13 21:40:39 +00:00
|
|
|
dest: "/etc/containers/policy.json"
|
|
|
|
mode: '755'
|
2023-09-08 20:41:09 +00:00
|
|
|
|
|
|
|
- name: Copy registries.json
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: registries.conf
|
2023-09-13 21:40:39 +00:00
|
|
|
dest: "/etc/containers/registries.conf"
|
|
|
|
mode: '755'
|
2023-09-08 20:41:09 +00:00
|
|
|
|
2023-09-13 21:40:39 +00:00
|
|
|
- name: Copy containers.conf
|
2023-09-11 20:23:53 +00:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: containers.conf
|
|
|
|
dest: "{{ podman_containers_config }}/containers.conf"
|
2023-09-13 21:40:39 +00:00
|
|
|
mode: '755'
|
2023-09-08 20:41:09 +00:00
|
|
|
|
2023-09-13 21:40:39 +00:00
|
|
|
- name: Copy storage.conf
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: storage.conf
|
|
|
|
dest: "{{ podman_containers_config }}/storage.conf"
|
|
|
|
mode: '755'
|
2023-09-08 20:41:09 +00:00
|
|
|
|
|
|
|
- name: Copy registries.json
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: registries.conf.d/shortnames.conf
|
2023-09-13 21:40:39 +00:00
|
|
|
dest: "/etc/containers/registries.conf.d/shortnames.conf"
|
|
|
|
mode: '755'
|
|
|
|
|
|
|
|
- name: set ping group range permissions
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: "/etc/sysctl.d/podman_ping_group.conf"
|
|
|
|
line: "net.ipv4.ping_group_range=0 2000000"
|
|
|
|
create: true
|
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'
|
2023-09-13 21:40:39 +00:00
|
|
|
|