Execution
Date 06 Sep 2024 11:37:24 +0100
Duration 00:00:19.93
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
8 Tasks
8 Results
1 Plays
6 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/GH_solus_img_26.yaml

---
- name: Playbook for Solus images issue 26
  hosts: all
  gather_facts: false
  roles:
    - plesk
  tasks:
    - name: Set files to upload
      when: plesk_found
      ansible.builtin.set_fact:
        files_to_upload:
          - /home/ssh-gateway/ansible/kuly/files/agent360
          - /home/ssh-gateway/ansible/kuly/files/alt-php
          - /home/ssh-gateway/ansible/kuly/files/cldeploy
          - /home/ssh-gateway/ansible/kuly/files/cloud-init
          - /home/ssh-gateway/ansible/kuly/files/httpd
          - /home/ssh-gateway/ansible/kuly/files/kcarectl
          - /home/ssh-gateway/ansible/kuly/files/kdump
          - /home/ssh-gateway/ansible/kuly/files/mariadb
          - /home/ssh-gateway/ansible/kuly/files/nginx

    - name: Upload the files
      when: plesk_found
      ansible.builtin.copy:
        src: "{{ item }}"
        dest: "/tmp/{{ item | basename }}"
        mode: '0644'

      loop: "{{ files_to_upload }}"
      tags: upload

    - name: Move uploaded files
      when: plesk_found
      ansible.builtin.shell: |
        set -o pipefail
        "mv /etc/logrotate.d/{{ item | basename }} /etc/logrotate.d/{{ item | basename }}.bak-$(date +%s)"
        "mv /tmp/{{ item | basename }} /etc/logrotate.d/"
      loop: "{{ files_to_upload }}"
      tags: move
      changed_when: true