add docker_install_official_repo flag for custom repos

This commit is contained in:
ace 2023-03-30 12:38:11 +03:00
parent 86e2ef8735
commit fb374b732b
Signed by: ace
GPG Key ID: 2C08973DD37A76FD
3 changed files with 4 additions and 0 deletions

View File

@ -1,2 +1,3 @@
---
docker_version: "20.10.23"
docker_install_official_repo: true

View File

@ -10,6 +10,7 @@
url: "{{ item.url }}"
keyring: "{{ item.keyring }}"
loop: "{{ docker_apt_key }}"
when: docker_install_official_repo
- name: Add Docker repository
ansible.builtin.apt_repository:
@ -18,6 +19,7 @@
filename: "{{ item.filename }}"
update_cache: yes
loop: "{{ docker_apt_repository }}"
when: docker_install_official_repo
- name: Ensure {{ docker_package }} installed
apt:

View File

@ -11,6 +11,7 @@
gpgkey: "{{ item.gpgkey | default('omit') }}"
async: "{{ item.async | default('yes') }}"
loop: "{{ docker_rpm_repository }}"
when: docker_install_official_repo
- name: Ensure {{ docker_package }} is installed
yum: