added auto_update feature
This commit is contained in:
parent
d2cd776732
commit
bbe35f8d48
@ -18,6 +18,11 @@ install_docker_edition: ce # by default, set to ce
|
|||||||
```
|
```
|
||||||
This variable sets the edition of docker to install. It can be either `ce` (community edition) or `ee` (enterprise edition).
|
This variable sets the edition of docker to install. It can be either `ce` (community edition) or `ee` (enterprise edition).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
install_docker_auto_update: false # by default, set to false
|
||||||
|
```
|
||||||
|
This variable allows you to choose to automatically update docker if a newer version is available whenever the role is replayed. Updating docker is usually pretty safe if done on a regular basis.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
install_docker_start_service: true
|
install_docker_start_service: true
|
||||||
```
|
```
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
# install_docker_edition: ce # can be ce or ee (community or enterprise)
|
# install_docker_edition: ce # can be ce or ee (community or enterprise)
|
||||||
|
# install_docker_auto_update: false
|
||||||
# install_docker_start_service: true
|
# install_docker_start_service: true
|
||||||
# install_docker_compose: false
|
# install_docker_compose: false
|
||||||
# install_docker_compose_version: latest
|
# install_docker_compose_version: latest
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
# defaults file for install_docker
|
# defaults file for install_docker
|
||||||
install_docker_edition: ce # can be ce or ee (community or enterprise)
|
install_docker_edition: ce # can be ce or ee (community or enterprise)
|
||||||
|
install_docker_auto_update: false
|
||||||
install_docker_start_service: true
|
install_docker_start_service: true
|
||||||
install_docker_compose: false
|
install_docker_compose: false
|
||||||
install_docker_compose_version: latest
|
install_docker_compose_version: latest
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
install_docker_edition: ce # can be ce or ee (community or enterprise)
|
install_docker_edition: ce # can be ce or ee (community or enterprise)
|
||||||
|
install_docker_auto_update: true
|
||||||
install_docker_start_service: true
|
install_docker_start_service: true
|
||||||
install_docker_compose: true
|
install_docker_compose: true
|
||||||
install_docker_compose_version: latest
|
install_docker_compose_version: latest
|
||||||
|
@ -12,20 +12,20 @@ install_docker_daemon_dir: /etc/docker
|
|||||||
install_docker_packages:
|
install_docker_packages:
|
||||||
- name: "docker-{{ install_docker_edition }}"
|
- name: "docker-{{ install_docker_edition }}"
|
||||||
version: latest
|
version: latest
|
||||||
state: present
|
state: "{% if install_docker_auto_update %}latest{% else %}present{% endif %}"
|
||||||
- name: "docker-{{ install_docker_edition }}-cli"
|
- name: "docker-{{ install_docker_edition }}-cli"
|
||||||
version: latest
|
version: latest
|
||||||
state: present
|
state: "{% if install_docker_auto_update %}latest{% else %}present{% endif %}"
|
||||||
- name: "docker-{{ install_docker_edition }}-rootless-extras"
|
- name: "docker-{{ install_docker_edition }}-rootless-extras"
|
||||||
version: latest
|
version: latest
|
||||||
state: present
|
state: "{% if install_docker_auto_update %}latest{% else %}present{% endif %}"
|
||||||
- name: "containerd.io"
|
- name: "containerd.io"
|
||||||
version: latest
|
version: latest
|
||||||
state: present
|
state: "{% if install_docker_auto_update %}latest{% else %}present{% endif %}"
|
||||||
install_docker_pip_packages:
|
install_docker_pip_packages:
|
||||||
- name: docker
|
- name: docker
|
||||||
version_constraint: latest
|
version_constraint: latest
|
||||||
state: present
|
state: "{% if install_docker_auto_update %}latest{% else %}present{% endif %}"
|
||||||
install_docker_repository:
|
install_docker_repository:
|
||||||
- uri: "https://download.docker.com/linux/{{ ansible_distribution|lower }}"
|
- uri: "https://download.docker.com/linux/{{ ansible_distribution|lower }}"
|
||||||
gpg_key: "https://download.docker.com/linux/{{ ansible_distribution|lower }}/gpg"
|
gpg_key: "https://download.docker.com/linux/{{ ansible_distribution|lower }}/gpg"
|
||||||
|
Loading…
Reference in New Issue
Block a user