-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from open-austin/updates4release
Update Ansible roles; set default session to 87
- Loading branch information
Showing
87 changed files
with
12,985 additions
and
108 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
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,4 @@ | ||
skip_list: | ||
- 'yaml' | ||
- 'risky-shell-pipe' | ||
- 'role-name' |
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,2 +1,5 @@ | ||
*.retry | ||
tests/test.sh | ||
*/__pycache__ | ||
*.pyc | ||
.cache | ||
|
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,11 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
line-length: | ||
max: 200 | ||
level: warning | ||
|
||
ignore: | | ||
.github/stale.yml | ||
.travis.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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
- name: restart docker | ||
service: name=docker state=restarted | ||
service: "name=docker state={{ docker_restart_handler_state }}" |
24 changes: 24 additions & 0 deletions
24
src/ansible/roles/ansible-role-docker/molecule/default/converge.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
become: true | ||
|
||
pre_tasks: | ||
- name: Update apt cache. | ||
apt: update_cache=yes cache_valid_time=600 | ||
when: ansible_os_family == 'Debian' | ||
|
||
- name: Wait for systemd to complete initialization. # noqa 303 | ||
command: systemctl is-system-running | ||
register: systemctl_status | ||
until: > | ||
'running' in systemctl_status.stdout or | ||
'degraded' in systemctl_status.stdout | ||
retries: 30 | ||
delay: 5 | ||
when: ansible_service_mgr == 'systemd' | ||
changed_when: false | ||
failed_when: systemctl_status.rc > 1 | ||
|
||
roles: | ||
- role: geerlingguy.docker |
17 changes: 17 additions & 0 deletions
17
src/ansible/roles/ansible-role-docker/molecule/default/molecule.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: instance | ||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
playbooks: | ||
converge: ${MOLECULE_PLAYBOOK:-converge.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Ensure docker users are added to the docker group. | ||
user: | ||
name: "{{ item }}" | ||
groups: docker | ||
append: true | ||
with_items: "{{ docker_users }}" |
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,18 +1,27 @@ | ||
--- | ||
- include: setup-RedHat.yml | ||
- include_tasks: setup-RedHat.yml | ||
when: ansible_os_family == 'RedHat' | ||
|
||
- include: setup-Debian.yml | ||
- include_tasks: setup-Debian.yml | ||
when: ansible_os_family == 'Debian' | ||
|
||
- name: Install Docker. | ||
package: name={{ docker_package }} state={{ docker_package_state }} | ||
package: | ||
name: "{{ docker_package }}" | ||
state: "{{ docker_package_state }}" | ||
notify: restart docker | ||
|
||
- name: Ensure Docker is started and enabled at boot. | ||
service: | ||
name: docker | ||
state: started | ||
enabled: yes | ||
state: "{{ docker_service_state }}" | ||
enabled: "{{ docker_service_enabled }}" | ||
|
||
- include: docker-compose.yml | ||
when: docker_install_compose | ||
- name: Ensure handlers are notified now to avoid firewall conflicts. | ||
meta: flush_handlers | ||
|
||
- include_tasks: docker-compose.yml | ||
when: docker_install_compose | bool | ||
|
||
- include_tasks: docker-users.yml | ||
when: docker_users | length > 0 |
32 changes: 16 additions & 16 deletions
32
src/ansible/roles/ansible-role-docker/tasks/setup-Debian.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
--- | ||
- name: Ensure old versions of Docker are not installed. | ||
package: | ||
name: '{{ item }}' | ||
name: | ||
- docker | ||
- docker-engine | ||
state: absent | ||
with_items: | ||
- docker | ||
- docker-engine | ||
|
||
- name: Ensure depdencies are installed. | ||
- name: Ensure dependencies are installed. | ||
apt: | ||
name: "{{ item }}" | ||
name: | ||
- apt-transport-https | ||
- ca-certificates | ||
- gnupg2 | ||
state: present | ||
with_items: | ||
- apt-transport-https | ||
- ca-certificates | ||
|
||
- name: Add Docker apt key. | ||
apt_key: | ||
url: https://download.docker.com/linux/ubuntu/gpg | ||
url: "{{ docker_apt_gpg_key }}" | ||
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 | ||
state: present | ||
register: add_repository_key | ||
ignore_errors: true | ||
ignore_errors: "{{ docker_apt_ignore_key_error }}" | ||
|
||
- name: Ensure curl is present (on older systems without SNI). | ||
package: name=curl state=present | ||
when: add_repository_key|failed | ||
when: add_repository_key is failed | ||
|
||
- name: Add Docker apt key (alternative for older systems without SNI). | ||
shell: "curl -sSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -" | ||
shell: > | ||
curl -sSL {{ docker_apt_gpg_key }} | sudo apt-key add - | ||
args: | ||
warn: no | ||
when: add_repository_key|failed | ||
warn: false | ||
when: add_repository_key is failed | ||
|
||
- name: Add Docker repository. | ||
apt_repository: | ||
repo: "{{ docker_apt_repository }}" | ||
state: present | ||
update_cache: yes | ||
update_cache: true |
Oops, something went wrong.