From 422888afee7d98730589f5e8867e70a10ac313af Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 18 Jul 2025 14:56:34 -0400 Subject: [PATCH] File copy path --- A000001.yml | 21 +++++++++++++-------- A000002.yml | 22 +++++++++++++--------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/A000001.yml b/A000001.yml index e398937..9275052 100644 --- a/A000001.yml +++ b/A000001.yml @@ -9,13 +9,13 @@ mode: 0775 recurse: yes - - name: Local Dicrectory for Docker Compose File - ansible.builtin.file: - # path: /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}} - path: /tmp/semaphore/repository_2_2/parts/{{ANSIBLE_TRANSPORT_PATH}} - state: directory - register: local_dir - delegate_to: localhost + # - name: Local Dicrectory for Docker Compose File + # ansible.builtin.file: + # # path: /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}} + # path: /tmp/semaphore/repository_2_2/parts/{{ANSIBLE_TRANSPORT_PATH}} + # state: directory + # register: local_dir + # delegate_to: localhost # - name: INFO - Find out playbooks path # shell: pwd @@ -30,8 +30,13 @@ # - name: # shell: mkdir /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}} + # - name: Copy file from 10.10.10.13 to LOCAL Directory + # shell: sshpass -p '{{ password_variable }}' scp {{WHAT_PART_REMOTE}}/docker-compose.yml /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml + # vars: + # password_variable: "May12002!x" # Or, preferably, use Ansible Vault + - name: Copy file from 10.10.10.13 to LOCAL Directory - shell: sshpass -p '{{ password_variable }}' scp {{WHAT_PART_REMOTE}}/docker-compose.yml /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml + 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 diff --git a/A000002.yml b/A000002.yml index 4b74ac8..f5a47f9 100644 --- a/A000002.yml +++ b/A000002.yml @@ -9,13 +9,13 @@ mode: 0775 recurse: yes - - name: Local Dicrectory for Docker Compose File - ansible.builtin.file: - # path: /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}} - path: /tmp/semaphore/repository_2_2/parts/{{ANSIBLE_TRANSPORT_PATH}} - state: directory - register: local_dir - delegate_to: localhost + # - name: Local Dicrectory for Docker Compose File + # ansible.builtin.file: + # # path: /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}} + # path: /tmp/semaphore/repository_2_2/parts/{{ANSIBLE_TRANSPORT_PATH}} + # state: directory + # register: local_dir + # delegate_to: localhost # - name: INFO - Find out playbooks path # shell: pwd @@ -25,14 +25,18 @@ # - name: Local Dicrectory for Docker Compose File ON LOCAL # shell: mkdir parts/{{ANSIBLE_TRANSPORT_PATH}} - # # - name: Copy file from 10.10.10.13 to Local Directory # # shell: scp ~/.ssh/id_rsa.pub {{WHAT_PART_REMOTE}}/docker-compose.yml /home/semaphore/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml # - name: # shell: mkdir /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}} + # - name: Copy file from 10.10.10.13 to LOCAL Directory + # shell: sshpass -p '{{ password_variable }}' scp {{WHAT_PART_REMOTE}}/docker-compose.yml /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml + # vars: + # password_variable: "May12002!x" # Or, preferably, use Ansible Vault + - name: Copy file from 10.10.10.13 to LOCAL Directory - shell: sshpass -p '{{ password_variable }}' scp {{WHAT_PART_REMOTE}}/docker-compose.yml /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml + 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