Files
AnsibleTest/A000002.yml
T
CHIEFSOFT\ameye 2b711c0f54 CONTAINER_NAME
2025-07-19 14:02:25 -04:00

42 lines
1.4 KiB
YAML

---
- hosts: "{{ WHAT_HOST_IN_USE }}"
tasks:
- name: "002 Creates directory {{ DESTINATION_FOLDER }}"
ansible.builtin.file:
path: "{{ DESTINATION_FOLDER }}"
state: directory
mode: 0775
recurse: yes
- name: Copy file from 10.10.10.13 to LOCAL Directory
shell: sshpass -p '{{ password_variable }}' scp {{WHAT_PART_REMOTE}}/docker-compose.yml {{DESTINATION_FOLDER}}/docker-compose.yml
vars:
password_variable: "May12002!x" # Or, preferably, use Ansible Vault
- name: Docker Login to Registry
shell:
chdir: "{{DESTINATION_FOLDER}}/"
cmd: docker login -u="merms" -p="may12002!" registry.chiefsoft.com
- name: docker compose up
shell:
chdir: "{{DESTINATION_FOLDER}}/"
cmd: docker-compose up -d
- name: docker exec create log folder
shell:
cmd: docker exec -it {{CONTAINER_NAME}} mkdir -p /var/www/html/writable/logs
- name: docker exec create cache folder
shell:
cmd: docker exec -it {{CONTAINER_NAME}} mkdir -p /var/www/html/writable/cache
- name: docker exec permission log folder
shell:
cmd: docker exec -it {{CONTAINER_NAME}} chmod 0777 /var/www/html/writable/logs
- name: docker exec permission cache folder
shell:
cmd: docker exec -it {{CONTAINER_NAME}} chmod 0777 /var/www/html/writable/cache