maj docker

This commit is contained in:
root 2024-01-20 17:11:15 +01:00
parent df9d3c6c1c
commit b146170467
2 changed files with 13 additions and 18 deletions

Binary file not shown.

View File

@ -1,21 +1,16 @@
---
- 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
- name: on recupere getdocker
get_url:
url: http://s-adm.gsb.adm/gsbstore/getdocker.sh
dest: /usr/local/bin/getdocker.sh
mode: 'a+x'
dest: /usr/local/bin
- name: Vérifier si Docker est installé
- name: on verifie si docker est installe
stat:
path: /usr/bin/docker
#command: which docker
register: docker_present
- name: Installer Docker si absent
command: "bash /usr/local/bin/getdocker.sh"
- name: Execution du script getdocker si docker n'est pas deja installe
shell: bash /usr/local/bin/getdocker.sh
#when: docker_present.stdout.find('/usr/bin/docker') == -1
when: not docker_present.stat.exists