add configs
This commit is contained in:
parent
19a3e6a912
commit
ad676bed26
6
handlers/main.yaml
Normal file
6
handlers/main.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Reload Docker Distribution
|
||||
become: true
|
||||
service:
|
||||
name: docker-distribution
|
||||
state: reloaded
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
- name: Install packages (RedHat)
|
||||
become: true
|
||||
yum:
|
||||
name: "{{ docker_distribution_packages }}"
|
||||
enablerepo: extras
|
||||
|
@ -1,20 +1,37 @@
|
||||
---
|
||||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ item }}.yaml"
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}"
|
||||
- "{{ ansible_distribution | lower }}"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}"
|
||||
- "{{ ansible_os_family | lower }}"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yaml"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
|
||||
- "{{ ansible_distribution | lower }}.yaml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yaml"
|
||||
- "{{ ansible_os_family | lower }}.yaml"
|
||||
|
||||
- name: Install packages
|
||||
include_tasks: "install/{{ item }}.yaml"
|
||||
include_tasks: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}"
|
||||
- "{{ ansible_distribution | lower }}"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}"
|
||||
- "{{ ansible_os_family | lower }}"
|
||||
- "install/{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yaml"
|
||||
- "install/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
|
||||
- "install/{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yaml"
|
||||
- "install/{{ ansible_distribution | lower }}.yaml"
|
||||
- "install/{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yaml"
|
||||
- "install/{{ ansible_os_family | lower }}.yaml"
|
||||
|
||||
- name: Drop configuration file
|
||||
become: true
|
||||
template:
|
||||
src: config.yml.j2
|
||||
dest: /etc/docker-distribution/registry/config.yml
|
||||
notify:
|
||||
- Reload Docker Distribution
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
- name: Start & enable service
|
||||
become: true
|
||||
service:
|
||||
name: docker-distribution
|
||||
state: started
|
||||
enabled: true
|
Loading…
Reference in New Issue
Block a user