Skip to content

Commit

Permalink
various linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hitchhooker committed Feb 3, 2024
1 parent 656dc47 commit ea2740c
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 27 deletions.
1 change: 1 addition & 0 deletions roles/proxmox_acl_access/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- acl
- list
register: pveum_acl_list
changed_when: False

- name: Register group acl list
ansible.builtin.set_fact:
Expand Down
1 change: 1 addition & 0 deletions roles/proxmox_acl_tokens/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions roles/proxmox_debian_gpgkeys/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
1 change: 1 addition & 0 deletions roles/proxmox_install_container_templates/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 5 additions & 3 deletions roles/proxmox_setup_nodes/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 5 additions & 5 deletions roles/setup_install_avalanche/handlers/main.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 2 additions & 2 deletions roles/setup_install_foundry/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion roles/setup_install_nginx/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roles/setup_install_optimism/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 7 additions & 8 deletions roles/setup_install_prometheus/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions roles/setup_install_rust/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion roles/setup_install_wireguard/meta/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ galaxy_info:
- linux
- vpn
- wireguard
dependencies:

dependencies:
4 changes: 2 additions & 2 deletions roles/setup_networking_iptables/handlers/main.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ea2740c

Please sign in to comment.