Upload files to "/"
This commit is contained in:
+28
-19
@@ -1,20 +1,29 @@
|
|||||||
---
|
---
|
||||||
- hosts: "{{ WHAT_HOST_IN_USE }}"
|
- hosts: "{{ WHAT_HOST_IN_USE }}"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: "005 Creates directory {{ DESTINATION_FOLDER }}"
|
- name: "005 Creates directory {{ DESTINATION_FOLDER }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ DESTINATION_FOLDER }}"
|
path: "{{ DESTINATION_FOLDER }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0775
|
mode: 0775
|
||||||
recurse: yes
|
recurse: yes
|
||||||
|
|
||||||
- name: Copy file from 10.10.10.13 to LOCAL Directory
|
- name: Docker Login to Registry
|
||||||
shell: sshpass -p '{{ password_variable }}' scp {{WHAT_PART_REMOTE}}/docker-compose.yml {{DESTINATION_FOLDER}}/docker-compose.yml
|
shell:
|
||||||
vars:
|
chdir: "{{DESTINATION_FOLDER}}/"
|
||||||
password_variable: "May12002!x" # Or, preferably, use Ansible Vault
|
cmd: docker login -u="merms" -p="may12002!" registry.chiefsoft.com
|
||||||
|
|
||||||
- name: docker compose up
|
- name: docker pull current image - {{CURRENT_IMAGE_REFRESH}}
|
||||||
shell:
|
shell:
|
||||||
chdir: "{{DESTINATION_FOLDER}}/"
|
cmd: docker pull {{CURRENT_IMAGE_REFRESH}}
|
||||||
|
|
||||||
|
- 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 compose up
|
||||||
|
shell:
|
||||||
|
chdir: "{{DESTINATION_FOLDER}}/"
|
||||||
cmd: docker-compose up -d
|
cmd: docker-compose up -d
|
||||||
@@ -9,6 +9,15 @@
|
|||||||
mode: 0775
|
mode: 0775
|
||||||
recurse: yes
|
recurse: yes
|
||||||
|
|
||||||
|
- name: Docker Login to Registry
|
||||||
|
shell:
|
||||||
|
chdir: "{{DESTINATION_FOLDER}}/"
|
||||||
|
cmd: docker login -u="merms" -p="may12002!" registry.chiefsoft.com
|
||||||
|
|
||||||
|
- name: docker pull current image - {{CURRENT_IMAGE_REFRESH}}
|
||||||
|
shell:
|
||||||
|
cmd: docker pull {{CURRENT_IMAGE_REFRESH}}
|
||||||
|
|
||||||
- name: Copy file from 10.10.10.13 to LOCAL Directory
|
- 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
|
shell: sshpass -p '{{ password_variable }}' scp {{WHAT_PART_REMOTE}}/docker-compose.yml {{DESTINATION_FOLDER}}/docker-compose.yml
|
||||||
vars:
|
vars:
|
||||||
|
|||||||
Reference in New Issue
Block a user