initial commit
This commit is contained in:
commit
467767b689
13
README.md
Normal file
13
README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# ansible-role-docker-distribution
|
||||
|
||||
## Examples
|
||||
|
||||
### Pass-through cache
|
||||
```yaml
|
||||
- hosts: registry
|
||||
roles:
|
||||
- docker-distribution
|
||||
vars:
|
||||
docker_distribution_proxy:
|
||||
remoteurl: https://registry-1.docker.io
|
||||
```
|
2
defaults/main.yaml
Normal file
2
defaults/main.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
docker_distribution_proxy: {}
|
19
meta/main.yaml
Normal file
19
meta/main.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
galaxy_info:
|
||||
role_name: docker-registry
|
||||
description: Install & configure Docker registry
|
||||
license: Apache
|
||||
|
||||
author: Mohammed Naser
|
||||
company: VEXXHOST, Inc.
|
||||
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- stretch
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- bionic
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
7
tasks/install/centos.yaml
Normal file
7
tasks/install/centos.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Install packages (RedHat)
|
||||
yum:
|
||||
name: "{{ docker_distribution_packages }}"
|
||||
enablerepo: extras
|
||||
state: present
|
||||
when: ansible_os_family == 'RedHat'
|
20
tasks/main.yaml
Normal file
20
tasks/main.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ item }}.yaml"
|
||||
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 }}"
|
||||
|
||||
- name: Install packages
|
||||
import_tasks: "install/{{ item }}.yaml"
|
||||
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 }}"
|
15
templates/config.yml.j2
Normal file
15
templates/config.yml.j2
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
version: 0.1
|
||||
log:
|
||||
fields:
|
||||
service: registry
|
||||
storage:
|
||||
cache:
|
||||
layerinfo: inmemory
|
||||
filesystem:
|
||||
rootdirectory: /var/lib/registry
|
||||
{% if docker_distribution_proxy %}
|
||||
proxy: {{ docker_distribution_proxy | to_nice_yaml }}
|
||||
{% endif %}
|
||||
http:
|
||||
addr: :5000
|
3
vars/centos.yaml
Normal file
3
vars/centos.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
docker_distribution_packages:
|
||||
- docker-distribution
|
Loading…
x
Reference in New Issue
Block a user