28 lines
633 B
YAML
28 lines
633 B
YAML
- ansible.builtin.stat:
|
|
path: /usr/local/bin/docker-compose
|
|
register: stat_result
|
|
|
|
- ansible.builtin.debug:
|
|
var: stat_result
|
|
|
|
- ansible.builtin.apt:
|
|
name: "{{ item }}"
|
|
state: present
|
|
update_cache: yes
|
|
with_items:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
- curl
|
|
- software-properties-common
|
|
when: stat_result.stat.exists == False
|
|
|
|
- ansible.builtin.shell:
|
|
cmd: curl -sSL https://get.docker.com/ | CHANNEL=stable sh
|
|
when: stat_result.stat.exists == False
|
|
|
|
- ansible.builtin.service:
|
|
name: docker
|
|
enabled: yes
|
|
state: restarted
|
|
when: stat_result.stat.exists == False
|
|
|