-
Notifications
You must be signed in to change notification settings - Fork 2
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
9 changed files
with
130 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
language: python | ||
python: "2.7" | ||
|
||
# Use the new container infrastructure | ||
sudo: false | ||
|
||
# Install ansible | ||
addons: | ||
apt: | ||
packages: | ||
- python-pip | ||
|
||
install: | ||
# Install ansible | ||
- pip install ansible | ||
|
||
# Check ansible version | ||
- ansible --version | ||
|
||
# Create ansible.cfg with correct roles_path | ||
- printf '[defaults]\nroles_path=../' >ansible.cfg | ||
|
||
script: | ||
# Basic role syntax check | ||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check | ||
|
||
notifications: | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
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 +1,32 @@ | ||
# ansible-role-docker | ||
ansible-role-docker | ||
========= | ||
|
||
This role installs and configures the docker. | ||
|
||
Requirements | ||
------------ | ||
|
||
Ubuntu 16.04 Xenial Xerus | ||
|
||
Role Variables | ||
-------------- | ||
|
||
|
||
Dependencies | ||
------------ | ||
|
||
|
||
Example Playbook | ||
---------------- | ||
|
||
- hosts: servers | ||
roles: | ||
- { role: chirkin.ansible-role-docker } | ||
|
||
License | ||
------- | ||
|
||
BSD | ||
|
||
Author Information | ||
------------------ |
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 @@ | ||
--- |
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,8 @@ | ||
--- | ||
- name: daemon-reload | ||
command: 'systemctl daemon-reload' | ||
|
||
- name: restart docker | ||
service: | ||
name: docker | ||
state: restarted |
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,19 @@ | ||
galaxy_info: | ||
author: a4irkin | ||
description: Ansible docker role | ||
|
||
license: license (GPLv2, CC-BY, etc) | ||
|
||
min_ansible_version: 1.2 | ||
|
||
- name: Ubuntu | ||
versions: | ||
- xenial | ||
|
||
galaxy_tags: | ||
- docker | ||
- linux | ||
- xenial | ||
- installer | ||
|
||
dependencies: [] |
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,33 @@ | ||
--- | ||
- name: add docker repo apt key | ||
apt_key: | ||
keyserver=p80.pool.sks-keyservers.net | ||
id=58118E89F3A912897C070ADBF76221572C52609D | ||
state=present | ||
|
||
- name: add docker repository | ||
apt_repository: | ||
repo="deb https://apt.dockerproject.org/repo ubuntu-xenial main" | ||
update_cache=yes | ||
|
||
- name: install docker | ||
apt: name=docker-engine | ||
|
||
- name: create /etc/systemd/system/docker.service.d directory | ||
file: | ||
dest=/etc/systemd/system/docker.service.d | ||
recurse=yes | ||
state=directory | ||
|
||
- name: uploads docker configuration file | ||
template: | ||
src: 'docker/docker.conf.j2' | ||
dest: '/etc/systemd/system/docker.service.d/docker.conf' | ||
notify: | ||
- 'daemon-reload' | ||
- 'restart docker' | ||
|
||
- name: install docker-py | ||
pip: name=docker-py | ||
|
||
- meta: flush_handlers |
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 @@ | ||
localhost |
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,5 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
roles: | ||
- ansible-role-docker |
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,2 @@ | ||
--- | ||
# vars file for . |