chore: use FQCN for module name

This commit is contained in:
Adrien Waksberg 2021-11-22 11:28:13 +01:00
parent 5d8e273810
commit 8a95fc66e5
3 changed files with 10 additions and 9 deletions

View file

@ -1,13 +1,13 @@
---
- name: init swarm cluster
docker_swarm:
community.docker.docker_swarm:
advertise_addr: '{{ docker_advertise_addr }}'
state: present
when: docker_swarm_manager
tags: docker
- name: join swarm cluster
docker_swarm:
community.docker.docker_swarm:
advertise_addr: '{{ docker_advertise_addr }}'
join_token: '{{ docker_join_token }}'
remote_addrs: '{{ docker_remote_addrs }}'

View file

@ -1,17 +1,16 @@
---
- name: manage networks
docker_network:
community.docker.docker_network:
name: '{{ item.name }}'
driver: '{{ item.driver|default("bridge") }}'
ipam_config: '{{ item.config|default([]) }}'
scope: swarm
state: '{{ item.state|default("present") }}'
loop: '{{ docker_networks }}'
tags: docker
- name: manage services
docker_swarm_service:
name: '{{ item.name }}'
community.docker.docker_swarm_service:
name: '{{ item.name }}'
image: '{{ item.image }}'
command: '{{ item.command|default([]) }}'
args: '{{ item.args|default([]) }}'
@ -29,8 +28,8 @@
tags: docker
- name: remove services
docker_swarm_service:
name: '{{ item.name }}'
community.docker.docker_swarm_service:
name: '{{ item.name }}'
state: absent
loop: '{{ docker_services }}'
when: '"state" in item and item.state == "absent"'

View file

@ -1,7 +1,9 @@
---
- name: install docker package
ansible.builtin.package:
name: docker.io
name:
- docker.io
- python3-docker
tags: docker
- name: enable and start service