22 lines
564 B
YAML
22 lines
564 B
YAML
---
|
|
- name: Récupérer et installer Docker
|
|
hosts: localhost
|
|
become: yes # Utiliser l'élévation de privilèges
|
|
|
|
tasks:
|
|
- name: Télécharger le script getdocker.sh
|
|
get_url:
|
|
url: http://s-adm.gsb.adm/gsbstore/getdocker.sh
|
|
dest: /usr/local/bin/getdocker.sh
|
|
mode: 'a+x'
|
|
|
|
- name: Vérifier si Docker est installé
|
|
stat:
|
|
path: /usr/bin/docker
|
|
register: docker_present
|
|
|
|
- name: Installer Docker si absent
|
|
command: "bash /usr/local/bin/getdocker.sh"
|
|
when: not docker_present.stat.exists
|
|
|