Execution
Date 12 Jul 2024 17:10:29 +0100
Duration 00:00:03.67
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.4
ara 1.7.1 / 1.7.1
Python 3.10.10
Summary
1 Hosts
2 Tasks
2 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/projects/RM8990/RM8990-download-inventories.yaml

---
- hosts: localhost
  gather_facts: false
  vars:
    download_folder: /home/ssh-gateway/ansible/inventory
    files:
      - ansible_hosts_custom.ini
      - ansible_hosts_harware_node.ini
      - ansible_hosts_plesk.ini
      - ansible_hosts_solus_repo.ini
  tasks:
    - name: clear the inventory folder of old hosts
      ansible.builtin.shell: |
        rm -f "{{ download_folder }}/{{ item }}"
      args:
        executable: /bin/bash
      changed_when: false
      with_items: "{{ files }}"
      tags:
        - clear_inv
    - name: download all ini and overwrite
      ansible.builtin.get_url:
        url: https://deploy.thecode.casa/firewall360/{{ item }}
        dest: "{{ download_folder }}/{{ item }}"
        mode: 0644
        force: true
      with_items: "{{ files }}"
      changed_when: false
      tags:
        - download_ini