-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
103 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
files/etc/systemd/system/docker.service.d/docker-storage.conf
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
- name: Ensure /etc/systemd/system/docker.service.d directory exists | ||
file: | ||
path: /etc/systemd/system/docker.service.d | ||
state: directory | ||
mode: 0755 | ||
become: yes | ||
|
||
- name: Setup default Docker drop-in to enable use of environment file | ||
template: | ||
src: drop-ins/default.conf.j2 | ||
dest: /etc/systemd/system/docker.service.d/default.conf | ||
become: yes | ||
register: systemd_docker_dropin | ||
vars: | ||
systemd_envs_dir: "{{ docker_systemd_envs_dir[_docker_os_dist] }}" | ||
|
||
- name: Setup Docker environment file {{ docker_systemd_envs_dir[_docker_os_dist] }}/docker-envs | ||
template: | ||
src: docker-envs.j2 | ||
dest: "{{ docker_systemd_envs_dir[_docker_os_dist] }}/docker-envs" | ||
become: yes | ||
register: systemd_docker_env | ||
vars: | ||
docker_opts: "{{ docker_daemon_opts }}" | ||
|
||
- name: Force daemon reload of systemd | ||
systemd: | ||
daemon_reload: yes | ||
become: yes | ||
when: systemd_docker_dropin|changed or systemd_docker_env|changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DOCKER_OPTS='{{ docker_opts }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[Service] | ||
EnvironmentFile=-{{ systemd_envs_dir }}/docker-envs | ||
ExecStart= | ||
ExecStart=/usr/bin/dockerd $DOCKER_OPTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- hosts: test-host | ||
vars: | ||
docker_daemon_config: | ||
hosts: | ||
# fd:// does not work in CentOS | ||
- unix:///var/run/docker.sock | ||
- tcp://0.0.0.0:2376 | ||
init: true | ||
roles: | ||
- haxorof.docker-ce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,56 @@ | ||
configs: | ||
use: 'centos' | ||
centos_no_docker: | ||
use: 'defaults_centos' | ||
# No Docker installed | ||
no_docker_centos: | ||
box: 'geerlingguy/centos7' | ||
prep_yml: prepare.yml | ||
test_yml: test_nothing.yml | ||
centos: | ||
# Older Docker test | ||
old_docker_centos: | ||
box: 'geerlingguy/centos7' | ||
prep_yml: prepare.yml | ||
test_yml: test_old_version.yml | ||
# Role default tests | ||
defaults_centos: | ||
box: 'geerlingguy/centos7' | ||
prep_yml: prepare.yml | ||
test_yml: test_defaults.yml | ||
defaults_ubuntu_trusty: | ||
box: 'geerlingguy/ubuntu1404' | ||
prep_yml: prepare.yml | ||
test_yml: test_defaults.yml | ||
centos_config: | ||
defaults_debian_jessie: | ||
box: 'geerlingguy/debian8' | ||
prep_yml: prepare.yml | ||
test_yml: test_defaults.yml | ||
# Config tests | ||
config_centos: | ||
box: 'geerlingguy/centos7' | ||
prep_yml: prepare.yml | ||
test_yml: test_config.yml | ||
centos_storage: | ||
# Storage testing | ||
config_storage_centos: | ||
box: 'geerlingguy/centos7' | ||
prep_yml: prepare_storage.yml | ||
test_yml: test_config_storage.yml | ||
centos_old_docker: | ||
box: 'geerlingguy/centos7' | ||
prep_yml: prepare.yml | ||
test_yml: test_old_version.yml | ||
ubuntu_trusty: | ||
box: 'geerlingguy/ubuntu1404' | ||
prep_yml: prepare.yml | ||
test_yml: test_config.yml | ||
ubuntu_xenial: | ||
config_storage_ubuntu_xenial: | ||
box: 'geerlingguy/ubuntu1604' | ||
prep_yml: prepare_storage.yml | ||
test_yml: test_config_storage.yml | ||
debian_jessie: | ||
box: 'geerlingguy/debian8' | ||
prep_yml: prepare.yml | ||
test_yml: test_config.yml | ||
debian_stretch: | ||
config_storage_debian_stretch: | ||
box: 'geerlingguy/debian9' | ||
prep_yml: prepare_storage.yml | ||
test_yml: test_config_storage.yml | ||
# Issue testing | ||
issue_42_ubuntu_xenial: | ||
box: 'geerlingguy/ubuntu1604' | ||
prep_yml: prepare.yml | ||
test_yml: test_issue_42.yml | ||
issue_42_debian_stretch: | ||
box: 'geerlingguy/debian9' | ||
prep_yml: prepare.yml | ||
test_yml: test_issue_42.yml | ||
issue_42_centos: | ||
box: 'geerlingguy/centos7' | ||
prep_yml: prepare.yml | ||
test_yml: test_issue_42.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters