Files
SDIS-29-3.p2/ansible/payara.yml
2025-12-05 15:49:05 +01:00

69 lines
1.6 KiB
YAML

---
- name:
hosts: ap33-pt
become: yes
tasks:
- name: download docker
ansible.builtin.get_url:
url: http://depl.sio.lan/store/get-docker.sh
dest: /tmp
- name: execution script get docker
ansible.builtin.shell:
cmd: export https_proxy=http://10.121.38.1:8080 ; bash /tmp/get-docker.sh
- name: creation dossier payara
ansible.builtin.file:
path: /SDIS-29-3.p2/ansible/payara
state: directory
mode: '0755'
become: no
- name: importation compose.yml
ansible.builtin.copy:
src: ./compose.yml
dest: /SDIS-29-3.p2/ansible/paraya/compose.yml
mode: '0755'
- name: importation variables.env
ansible.builtin.copy:
src: ./variables.env
dest: /SDIS-29-3.p2/ansible/paraya
mode: '0755'
- name: docker pull
ansible.builtin.script:
cmd: cd ~/payara ; docker compose pull
- name: Création du fichier docker.service.d
ansible.builtin.file:
path: /etc/systemd/system/docker.service.d
state: directory
- name: Copy des règles de proxy
ansible.builtin.copy:
src: ./http-proxy.conf
dest: /etc/systemd/system/docker.service.d
- name: Restart daemon-reload
ansible.builtin.shell:
cmd:
systemctl daemon-reload
- name: Docker restart
ansible.builtin.service:
name: docker
state: restarted
- name: Docker pull
ansible.builtin.shell:
cmd:
cd ~/payara && docker compose pull
- name: Docker up
ansible.builtin.shell:
cmd:
cd ~/payara && docker compose up -d