Execution
Date 09 Dec 2024 15:42:34 +0000
Duration 00:05:09.69
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.2 / 1.7.2
Python 3.10.10
Summary
233 Hosts
1 Tasks
233 Results
1 Plays
1 Files
0 Records

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

---
- name: Playbook to switch agent360 to root
  hosts: all
  gather_facts: false
  tasks:
    - name: Run commands
      ansible.builtin.shell: |
        set -o pipefail
        rm -f /etc/sudoers.d/agent360
        rm -f /tmp/*sum*
        mkdir /etc/systemd/system/agent360.service.d/
        echo -e "[Service]\nUser=root" > /etc/systemd/system/agent360.service.d/override.conf
        systemctl daemon-reload
        systemctl restart agent360.service
        curl -Ls https://deploy.thecode.casa/agent360_plugins/install.sh  | bash -s apache_errors
        curl -Ls https://deploy.thecode.casa/agent360_plugins/install.sh  | bash -s fpm_errors
        curl -Ls https://deploy.thecode.casa/agent360_plugins/install.sh  | bash -s provider_metrics
      args:
        executable: /bin/bash
      changed_when: false