-
Notifications
You must be signed in to change notification settings - Fork 70
/
main.yml
44 lines (38 loc) · 1.12 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
- set_fact:
package_manager: apt
when: ansible_os_family == "Debian"
- set_fact:
package_manager: yum
when: ansible_os_family == "RedHat"
- name: Including distro specific variables
include_vars: "{{ item }}"
with_first_found:
- "{{ secrets_path }}/container-host/{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}.yml"
- "{{ package_manager }}_systems.yml"
- empty.yml
- name: Install container packages
package:
name: "{{ container_packages }}"
state: latest
when: container_packages|length > 0
- set_fact:
container_service_conf: "/etc/containers/registries.conf"
when:
- "'podman' in container_packages"
tags:
- container-mirror
- set_fact:
container_service_conf: "/etc/docker/daemon.json"
when:
- "'docker.io' in container_packages"
- "'podman' not in container_packages"
tags:
- container-mirror
- import_tasks: container_mirror.yml
when:
- container_mirror is defined
- container_mirror_cert is defined
tags:
- container-mirror