mirror of
https://github.com/Maks1mS/ansible-role-docker.git
synced 2024-12-24 00:33:04 +03:00
Add flag to deactivate repository configuration
This commit is contained in:
parent
b4a2ff5ee7
commit
8b623b2266
@ -26,6 +26,9 @@ docker_compose_arch: "{{ ansible_architecture }}"
|
||||
docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-linux-{{ docker_compose_arch }}"
|
||||
docker_compose_path: /usr/local/bin/docker-compose
|
||||
|
||||
# Enable repo setup
|
||||
docker_add_repo: true
|
||||
|
||||
# Docker repo URL.
|
||||
docker_repo_url: https://download.docker.com/linux
|
||||
|
||||
|
@ -33,18 +33,20 @@
|
||||
force: true
|
||||
register: add_repository_key
|
||||
ignore_errors: "{{ docker_apt_ignore_key_error }}"
|
||||
when: docker_add_repo | bool
|
||||
|
||||
- name: Ensure curl is present (on older systems without SNI).
|
||||
package: name=curl state=present
|
||||
when: add_repository_key is failed
|
||||
when: add_repository_key is failed and docker_add_repo | bool
|
||||
|
||||
- name: Add Docker apt key (alternative for older systems without SNI).
|
||||
shell: >
|
||||
curl -sSL {{ docker_apt_gpg_key }} | apt-key add -
|
||||
when: add_repository_key is failed
|
||||
when: add_repository_key is failed and docker_add_repo | bool
|
||||
|
||||
- name: Add Docker repository.
|
||||
apt_repository:
|
||||
repo: "{{ docker_apt_repository }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
when: docker_add_repo | bool
|
||||
|
@ -11,6 +11,7 @@
|
||||
rpm_key:
|
||||
key: "{{ docker_yum_gpg_key }}"
|
||||
state: present
|
||||
when: docker_add_repo | bool
|
||||
|
||||
- name: Add Docker repository.
|
||||
get_url:
|
||||
@ -19,6 +20,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: docker_add_repo | bool
|
||||
|
||||
- name: Configure Docker Nightly repo.
|
||||
ini_file:
|
||||
@ -28,6 +30,7 @@
|
||||
value: '{{ docker_yum_repo_enable_nightly }}'
|
||||
mode: 0644
|
||||
no_extra_spaces: true
|
||||
when: docker_add_repo | bool
|
||||
|
||||
- name: Configure Docker Test repo.
|
||||
ini_file:
|
||||
@ -37,6 +40,7 @@
|
||||
value: '{{ docker_yum_repo_enable_test }}'
|
||||
mode: 0644
|
||||
no_extra_spaces: true
|
||||
when: docker_add_repo | bool
|
||||
|
||||
- name: Configure containerd on RHEL 8.
|
||||
block:
|
||||
|
Loading…
Reference in New Issue
Block a user