fix ansible templates

This commit is contained in:
CHIEFSOFT\ameye
2025-07-18 15:08:48 -04:00
parent 6d0f090ef0
commit 6dcd84fd13
6 changed files with 60 additions and 123 deletions
-31
View File
@@ -9,42 +9,11 @@
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: INFO - Find out playbooks path
# shell: pwd
# register: playbook_path_output
# - debug: var=playbook_path_output.stdout
# - 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 {{DESTINATION_FOLDER}}/docker-compose.yml
vars:
password_variable: "May12002!x" # Or, preferably, use Ansible Vault
# - name: Set up docker-compose file
# template:
# src: "/home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml"
# dest: "{{DESTINATION_FOLDER}}"
- name: docker compose up
shell:
chdir: "{{DESTINATION_FOLDER}}/"
-31
View File
@@ -9,42 +9,11 @@
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: INFO - Find out playbooks path
# shell: pwd
# register: playbook_path_output
# - debug: var=playbook_path_output.stdout
# - 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 {{DESTINATION_FOLDER}}/docker-compose.yml
vars:
password_variable: "May12002!x" # Or, preferably, use Ansible Vault
# - name: Set up docker-compose file
# template:
# src: "/home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml"
# dest: "{{DESTINATION_FOLDER}}"
- name: docker compose up
shell:
chdir: "{{DESTINATION_FOLDER}}/"
+2 -20
View File
@@ -9,29 +9,11 @@
mode: 0775
recurse: yes
- name: Local Dicrectory for Docker Compose File
ansible.builtin.file:
path: /home/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}
state: directory
register: local_dir
delegate_to: localhost
# # - 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 parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml
- 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: Set up docker-compose file
template:
src: "/home/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml"
dest: "{{DESTINATION_FOLDER}}"
- name: docker compose up
shell:
chdir: "{{DESTINATION_FOLDER}}/"
+3 -21
View File
@@ -9,28 +9,10 @@
mode: 0775
recurse: yes
- name: Local Dicrectory for Docker Compose File
ansible.builtin.file:
path: /home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}
state: directory
register: local_dir
delegate_to: localhost
# # - 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 parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml
- 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: Set up docker-compose file
template:
src: "/home/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml"
dest: "{{DESTINATION_FOLDER}}"
password_variable: "May12002!x" # Or, preferably, use Ansible Vault
- name: docker compose up
shell:
+2 -20
View File
@@ -9,29 +9,11 @@
mode: 0775
recurse: yes
- name: Local Dicrectory for Docker Compose File
ansible.builtin.file:
path: /home/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}
state: directory
register: local_dir
delegate_to: localhost
# # - 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 parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml
- 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: Set up docker-compose file
template:
src: "/home/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml"
dest: "{{DESTINATION_FOLDER}}"
- name: docker compose up
shell:
chdir: "{{DESTINATION_FOLDER}}/"
+53
View File
@@ -110,6 +110,59 @@
# dest: "{{DESTINATION_FOLDER}}"
- name: docker compose up
shell:
chdir: "{{DESTINATION_FOLDER}}/"
cmd: docker-compose up -d
---
- 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: 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
# register: playbook_path_output
# - debug: var=playbook_path_output.stdout
# - 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 {{DESTINATION_FOLDER}}/docker-compose.yml
vars:
password_variable: "May12002!x" # Or, preferably, use Ansible Vault
# - name: Set up docker-compose file
# template:
# src: "/home/chiefsoft/semaphore/parts/{{ANSIBLE_TRANSPORT_PATH}}/docker-compose.yml"
# dest: "{{DESTINATION_FOLDER}}"
- name: docker compose up
shell:
chdir: "{{DESTINATION_FOLDER}}/"