-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove superfluous package cache updates (#50)
- Loading branch information
1 parent
de39728
commit b6827cd
Showing
16 changed files
with
95 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
- name: Perform local Docker install | ||
hosts: docker | ||
hosts: all | ||
roles: | ||
- nephelaiio.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
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,27 @@ | ||
--- | ||
- name: Deploy Docker packages | ||
hosts: all | ||
become: true | ||
tasks: | ||
- name: Prepare Debian systems | ||
when: ansible_os_family == 'Debian' | ||
block: | ||
- name: Update apt package cache | ||
ansible.builtin.apt: | ||
update_cache: true | ||
|
||
- name: Install package helpers | ||
ansible.builtin.apt: | ||
package: gpg-agent | ||
update_cache: true | ||
|
||
- name: Install python3 binary redirection | ||
ansible.builtin.apt: | ||
name: python-is-python3 | ||
|
||
- name: Remove docker packages | ||
ansible.builtin.include_role: | ||
name: nephelaiio.docker | ||
vars: | ||
docker_packages_state: absent | ||
docker_repo_manage: true |
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,6 +1,6 @@ | ||
--- | ||
- name: Verify | ||
hosts: docker | ||
hosts: all | ||
vars: | ||
docker_service: docker.service | ||
pre_tasks: | ||
|
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,6 +1,6 @@ | ||
--- | ||
- name: Deploy Docker packages | ||
hosts: docker | ||
hosts: all | ||
become: true | ||
roles: | ||
- nephelaiio.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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
- name: Update OS | ||
hosts: docker | ||
hosts: all | ||
become: true | ||
roles: | ||
- robertdebock.update |
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,72 +1,67 @@ | ||
--- | ||
- name: Configure apt repository | ||
when: | ||
- ansible_os_family == "Debian" | ||
- docker_repo_manage | ||
- name: Configure package repositories | ||
when: docker_repo_manage | ||
tags: install | ||
block: | ||
- name: Configure apt repository | ||
when: ansible_os_family == "Debian" | ||
block: | ||
- name: Install Debian package helpers | ||
ansible.builtin.apt: | ||
name: | ||
- apt-transport-https | ||
- ca-certificates | ||
- python3-docker | ||
- python3-pip | ||
- curl | ||
|
||
- name: Install Debian package helpers | ||
ansible.builtin.apt: | ||
name: | ||
- apt-transport-https | ||
- ca-certificates | ||
- python3-docker | ||
- python3-pip | ||
- curl | ||
update_cache: true | ||
- name: Install apt key | ||
ansible.builtin.apt_key: | ||
keyserver: "{{ docker_deb_repo.keyserver }}" | ||
state: present | ||
id: "{{ docker_deb_repo.key }}" | ||
ignore_errors: true | ||
register: apt_key_module | ||
|
||
- name: Install apt key | ||
ansible.builtin.apt_key: | ||
keyserver: "{{ docker_deb_repo.keyserver }}" | ||
state: present | ||
id: "{{ docker_deb_repo.key }}" | ||
ignore_errors: true | ||
register: apt_key_module | ||
- name: Force install apt key | ||
ansible.builtin.shell: | | ||
curl -fsSL {{ docker_deb_repo.keyserver }} | sudo apt-key add - | ||
when: apt_key_module.failed | ||
tags: skip_ansible_lint | ||
|
||
- name: Force install apt key | ||
ansible.builtin.shell: | | ||
curl -fsSL {{ docker_deb_repo.keyserver }} | sudo apt-key add - | ||
when: apt_key_module.failed | ||
tags: skip_ansible_lint | ||
- name: Manage apt repository | ||
ansible.builtin.apt_repository: | ||
repo: "{{ docker_deb_repo.url }}" | ||
state: "{{ docker_repo_state }}" | ||
filename: docker | ||
validate_certs: no | ||
notify: update_apt_cache # noqa name[casing] | ||
|
||
- name: Manage apt repository | ||
ansible.builtin.apt_repository: | ||
repo: "{{ docker_deb_repo.url }}" | ||
state: "{{ docker_repo_state }}" | ||
filename: docker | ||
validate_certs: no | ||
notify: update_apt_cache # noqa name[casing] | ||
- name: Configure yum repository | ||
when: ansible_os_family == "RedHat" | ||
block: | ||
- name: Install epel repository | ||
ansible.builtin.package: | ||
name: epel-release | ||
|
||
- name: Configure yum repository | ||
when: | ||
- ansible_os_family == "RedHat" | ||
- docker_repo_manage | ||
tags: install | ||
block: | ||
|
||
- name: Install epel repository | ||
ansible.builtin.package: | ||
name: epel-release | ||
|
||
- name: Install RedHat package helpers | ||
ansible.builtin.package: | ||
name: | ||
- python3-pip | ||
- python3-docker | ||
- name: Install RedHat package helpers | ||
ansible.builtin.package: | ||
name: | ||
- python3-pip | ||
- python3-docker | ||
|
||
- name: Manage yum repository | ||
ansible.builtin.get_url: | ||
url: "{{ docker_rpm_repo.url }}" | ||
dest: /etc/yum.repos.d/docker.repo | ||
mode: 'u=rw,go=r' | ||
when: docker_repo_state != 'absent' | ||
- name: Manage yum repository | ||
ansible.builtin.get_url: | ||
url: "{{ docker_rpm_repo.url }}" | ||
dest: /etc/yum.repos.d/docker.repo | ||
mode: 'u=rw,go=r' | ||
when: docker_repo_state != 'absent' | ||
|
||
- name: Remove yum repository | ||
ansible.builtin.file: | ||
dest: /etc/yum.repos.d/docker.repo | ||
state: absent | ||
when: docker_repo_state == 'absent' | ||
- name: Remove yum repository | ||
ansible.builtin.file: | ||
dest: /etc/yum.repos.d/docker.repo | ||
state: absent | ||
when: docker_repo_state == 'absent' | ||
|
||
- name: Flush handlers | ||
ansible.builtin.meta: flush_handlers |