forked from angstwad/docker.ubuntu
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And add support for Ubuntu 18.04 and Debian 9
- Loading branch information
1 parent
ecd0cf9
commit 15d471c
Showing
9 changed files
with
124 additions
and
58 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 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,20 +1,70 @@ | ||
# tasks file for docker | ||
--- | ||
- name: add public key | ||
apt_key: | ||
id: "{{ item.id }}" | ||
url: "{{ item.url }}" | ||
state: present | ||
with_items: "{{ docker_apt_key }}" | ||
- name: repository | dependencies | ||
apt: | ||
name: "{{ docker_dependencies_pre }}" | ||
state: "{{ apt_install_state | default('latest') }}" | ||
update_cache: true | ||
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" | ||
tags: | ||
- docker-repository-dependencies | ||
|
||
- name: repository | get python version | ||
shell: python --version 2>&1 | awk '{print $2}' | ||
register: _python_version | ||
changed_when: false | ||
tags: | ||
- docker-repository-add-public-key | ||
- docker-repository-get-python-version | ||
|
||
# Old python (TLS issues) | ||
- block: | ||
- name: repository | create (download) directory | ||
file: | ||
path: "{{ docker_downloads_path }}" | ||
state: directory | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
tags: | ||
- docker-repository-directory | ||
- docker-repository-directory-create | ||
|
||
- name: repository | download public key | ||
command: > | ||
curl -sSL {{ item.url }} -o {{ docker_downloads_path }}/{{ item.id }}.key | ||
args: | ||
creates: "{{ docker_downloads_path }}/{{ item.id }}.key" | ||
with_items: "{{ docker_apt_keys }}" | ||
tags: | ||
- docker-repository-public-key | ||
|
||
- name: repository | add public key | ||
apt_key: | ||
id: "{{ item.id }}" | ||
file: "{{ docker_downloads_path }}/{{ item.id }}.key" | ||
state: present | ||
with_items: "{{ docker_apt_keys }}" | ||
tags: | ||
- docker-repository-public-key | ||
when: _python_version.stdout is version('2.7.9', '<') | ||
|
||
# New python | ||
- block: | ||
- name: repository | add public key | ||
apt_key: | ||
id: "{{ item.id }}" | ||
url: "{{ item.url }}" | ||
state: present | ||
with_items: "{{ docker_apt_keys }}" | ||
tags: | ||
- docker-repository-public-key | ||
when: _python_version.stdout is version('2.7.9', '>=') | ||
|
||
- name: add repository | ||
- name: repository | add | ||
apt_repository: | ||
repo: "{{ item.type }} {{ item.url }} {{ item.component }}" | ||
state: present | ||
update_cache: true | ||
with_items: "{{ docker_apt_repository }}" | ||
with_items: "{{ docker_apt_repositories }}" | ||
tags: | ||
- docker-repository-add | ||
- docker-repository-add-repository |
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,19 +1,19 @@ | ||
# tasks file for docker | ||
--- | ||
- name: check ufw default file existence | ||
- name: ufw | check default file existence | ||
stat: | ||
path: "{{ docker_ufw_default_file }}" | ||
register: ufw_default_file_stats | ||
register: _ufw_default_file_stats | ||
when: docker_manage_ufw | ||
tags: | ||
- docker-ufw-check-default-file-existence | ||
|
||
- name: change ufw default forward policy | ||
- name: ufw | change default forward policy | ||
lineinfile: | ||
dest: "{{ docker_ufw_default_file }}" | ||
regexp: '^DEFAULT_FORWARD_POLICY=' | ||
line: 'DEFAULT_FORWARD_POLICY="ACCEPT"' | ||
when: docker_manage_ufw and ufw_default_file_stats.stat.exists | ||
when: docker_manage_ufw and _ufw_default_file_stats.stat.exists | ||
tags: | ||
- docker-ufw-update-default-file | ||
- docker-ufw-update-default-file-forward-policy |
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,15 +1,16 @@ | ||
# tasks file for docker | ||
--- | ||
- name: check updatedb file existence | ||
- name: updatedb | check file existence | ||
stat: | ||
path: "{{ docker_updatedb_file }}" | ||
register: updatedb_file_stats | ||
register: _updatedb_file_stats | ||
when: docker_manage_updatedb | ||
tags: | ||
- docker-updatedb-check-file-existence | ||
|
||
- name: disable indexing of /var/lib/docker | ||
command: /usr/bin/updatedb -e /var/lib/docker | ||
when: docker_manage_updatedb and updatedb_file_stats.stat.exists | ||
- name: updatedb | disable indexing of /var/lib/docker | ||
command: > | ||
/usr/bin/updatedb -e /var/lib/docker | ||
when: docker_manage_updatedb and _updatedb_file_stats.stat.exists | ||
tags: | ||
- docker-updatedb-disable-indexing |
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