diff --git a/roles/proxmox_acl_access/tasks/main.yaml b/roles/proxmox_acl_access/tasks/main.yaml index 9a737ff..ea45125 100644 --- a/roles/proxmox_acl_access/tasks/main.yaml +++ b/roles/proxmox_acl_access/tasks/main.yaml @@ -16,6 +16,7 @@ - acl - list register: pveum_acl_list + changed_when: False - name: Register group acl list ansible.builtin.set_fact: diff --git a/roles/proxmox_acl_tokens/tasks/main.yaml b/roles/proxmox_acl_tokens/tasks/main.yaml index 66ed32b..cc8294d 100644 --- a/roles/proxmox_acl_tokens/tasks/main.yaml +++ b/roles/proxmox_acl_tokens/tasks/main.yaml @@ -18,6 +18,7 @@ - "{{ item.name }}" with_items: "{{ proxmox_admin_accounts }}" register: user_token_list + changed_when: False - name: Store existing tokens ansible.builtin.set_fact: diff --git a/roles/proxmox_debian_gpgkeys/tasks/main.yaml b/roles/proxmox_debian_gpgkeys/tasks/main.yaml index 6d73f3c..a54413a 100644 --- a/roles/proxmox_debian_gpgkeys/tasks/main.yaml +++ b/roles/proxmox_debian_gpgkeys/tasks/main.yaml @@ -7,7 +7,7 @@ when: ansible_facts['distribution_release'] == "bullseye" - name: Get SHA512 of Proxmox OSS GPG Key (Bullseye) - ansible.builtin.shell: + ansible.builtin.command: cmd: sha512sum /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg register: sha512sum_result when: ansible_facts['distribution_release'] == "bullseye" @@ -20,7 +20,7 @@ - bullseye_gpg_key_hash not in sha512sum_result.stdout - name: Get SHA512 of Proxmox OSS GPG Key (Bookworm) - ansible.builtin.shell: + ansible.builtin.command: cmd: sha512sum /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg register: sha512sum_result when: ansible_facts['distribution_release'] == "bookworm" diff --git a/roles/proxmox_install_container_templates/tasks/main.yaml b/roles/proxmox_install_container_templates/tasks/main.yaml index 73d4213..d283421 100644 --- a/roles/proxmox_install_container_templates/tasks/main.yaml +++ b/roles/proxmox_install_container_templates/tasks/main.yaml @@ -7,6 +7,7 @@ - local register: pveam_output failed_when: pveam_output.rc != 0 + changed_when: False - name: Extract container templates from output ansible.builtin.set_fact: diff --git a/roles/proxmox_setup_nodes/tasks/main.yaml b/roles/proxmox_setup_nodes/tasks/main.yaml index f1cbe9c..56fcbf4 100644 --- a/roles/proxmox_setup_nodes/tasks/main.yaml +++ b/roles/proxmox_setup_nodes/tasks/main.yaml @@ -1,15 +1,17 @@ # Standards: 0.2 --- - name: Create predefined containers - community.general.proxmox: "{{ proxmox_defaults | combine(item.proxmox_config) }}" + community.general.proxmox: + config: "{{ proxmox_defaults | combine(item.proxmox_config) }}" loop: "{{ lxc_nodes }}" when: lxc_nodes is defined register: container_creation_result - name: Start predefined nodes - community.general.proxmox: "{{ proxmox_defaults | combine({'vmid': item.proxmox_config['vmid'], 'state': 'started'}) }}" + community.general.proxmox: + config: "{{ proxmox_defaults | combine({'vmid': item.proxmox_config['vmid'], 'state': 'started'}) }}" loop: "{{ lxc_nodes }}" when: - lxc_nodes is defined - - item.proxmox_config['state'] == 'present' + - item.proxmox_config['state'] == 'present' register: container_start_result diff --git a/roles/setup_install_avalanche/handlers/main.yaml b/roles/setup_install_avalanche/handlers/main.yaml index 8fd7cb4..8b28600 100644 --- a/roles/setup_install_avalanche/handlers/main.yaml +++ b/roles/setup_install_avalanche/handlers/main.yaml @@ -1,10 +1,10 @@ --- - name: Really Restart Avalanche - ansible.builtin.command: - argv: - - systemctl - - restart - - avalanchego + ansible.builtin.systemd: + name: avalanchego + daemon_reload: True + state: restarted + enabled: True - name: Restart Avalanche ansible.builtin.systemd: diff --git a/roles/setup_install_foundry/tasks/main.yaml b/roles/setup_install_foundry/tasks/main.yaml index 250ce10..95ed160 100644 --- a/roles/setup_install_foundry/tasks/main.yaml +++ b/roles/setup_install_foundry/tasks/main.yaml @@ -18,14 +18,14 @@ - Execute Foundry Installer - name: Run foundry installer script - ansible.builtin.shell: + ansible.builtin.command: cmd: "/tmp/foundry_install" when: not foundryup.stat.exists environment: FOUNDRY_DIR: /usr/local - name: Execute Foundry Installer - ansible.builtin.shell: + ansible.builtin.command: cmd: /usr/local/bin/foundryup when: not foundryup.stat.exists environment: diff --git a/roles/setup_install_nginx/tasks/main.yaml b/roles/setup_install_nginx/tasks/main.yaml index 921c133..d6a0d9e 100644 --- a/roles/setup_install_nginx/tasks/main.yaml +++ b/roles/setup_install_nginx/tasks/main.yaml @@ -11,9 +11,10 @@ register: packages_installed - name: Check certbot plugins - ansible.builtin.shell: + ansible.builtin.command: cmd: certbot plugins || true register: certbot_plugins_output + changed_when: False - name: Install certbot_dns_porkbun plugin if absent ansible.builtin.pip: diff --git a/roles/setup_install_optimism/tasks/main.yaml b/roles/setup_install_optimism/tasks/main.yaml index 9feda6f..c1db2a4 100644 --- a/roles/setup_install_optimism/tasks/main.yaml +++ b/roles/setup_install_optimism/tasks/main.yaml @@ -232,7 +232,7 @@ - "{{ optimism_base }}/password" - "{{ optimism_base }}/block-signer-key" chdir: "{{ optimism_base }}/optimism-v{{ optimism_version }}/l2geth/build/bin" - when: l2auth.stat.exists == False + when: not l2auth.stat.exists notify: - Restart Optimism-geth - Restart Optimism-dtl diff --git a/roles/setup_install_prometheus/tasks/main.yaml b/roles/setup_install_prometheus/tasks/main.yaml index 4bd85db..1e5dc7b 100644 --- a/roles/setup_install_prometheus/tasks/main.yaml +++ b/roles/setup_install_prometheus/tasks/main.yaml @@ -15,11 +15,10 @@ when: hostvars['monitor']['prometheus_latest_mon'] is defined - name: Check installed version of Prometheus - ansible.builtin.shell: - cmd: | - set -o pipefail - prometheus --version | grep prometheus | awk '{print substr($3, 0, length($3))}' + ansible.builtin.command: + cmd: prometheus --version | grep prometheus | awk '{print substr($3, 0, length($3))}' register: prometheus_installed + changed_when: False - name: Import Prometheus tasks ansible.builtin.import_tasks: "prometheus-tasks.yaml" @@ -34,10 +33,10 @@ mode: "0755" - name: Check Prometheus configuration - ansible.builtin.shell: - cmd: | - set -o pipefail - promtool check config /etc/prometheus/prometheus.yaml + ansible.builtin.command: + cmd: promtool check config /etc/prometheus/prometheus.yaml + register: prometheus_config + when: prometheus_latest.stdout != prometheus_installed.stdout - name: Restart service ansible.builtin.systemd: diff --git a/roles/setup_install_rust/tasks/main.yaml b/roles/setup_install_rust/tasks/main.yaml index 9e04c06..441f11b 100644 --- a/roles/setup_install_rust/tasks/main.yaml +++ b/roles/setup_install_rust/tasks/main.yaml @@ -18,8 +18,8 @@ force: False - name: Install Rust for the user if not present - ansible.builtin.shell: - cmd: sh /tmp/sh.rustup.rs -y + ansible.builtin.command: + cmd: "/tmp/sh.rustup.rs -y" when: not rust_installed.stat.exists notify: - Add Rust to PATH for bash diff --git a/roles/setup_install_wireguard/meta/main.yaml b/roles/setup_install_wireguard/meta/main.yaml index 358541c..50ea094 100644 --- a/roles/setup_install_wireguard/meta/main.yaml +++ b/roles/setup_install_wireguard/meta/main.yaml @@ -22,4 +22,5 @@ galaxy_info: - linux - vpn - wireguard - dependencies: + +dependencies: diff --git a/roles/setup_networking_iptables/handlers/main.yaml b/roles/setup_networking_iptables/handlers/main.yaml index cbf6284..0ae31a6 100644 --- a/roles/setup_networking_iptables/handlers/main.yaml +++ b/roles/setup_networking_iptables/handlers/main.yaml @@ -1,14 +1,14 @@ # Standards: 0.2 --- - name: Persist iptables - ansible.builtin.shell: + ansible.builtin.command: cmd: "{{ item }}" with_items: - "iptables-save > {{ default_iptables_v4_file }}" - "ip6tables-save > {{ default_iptables_v6_file }}" - name: Start default_nat_device - ansible.builtin.shell: + ansible.builtin.command: cmd: "ifup {{ default_nat_device }}" - name: Restart iptables