From 6a1c3285b20ae3e37e3e7cd82018c7bd7906eb56 Mon Sep 17 00:00:00 2001 From: Jared Hampson Date: Sat, 10 Aug 2024 21:30:31 -0500 Subject: [PATCH] fix(syntax): remove deprecated `warn` arg from shell tasks --- roles/fail2ban/handlers/main.yml | 2 -- roles/harden_os/tasks/patching.yml | 3 +-- roles/install_hacs/handlers/main.yml | 2 -- roles/preinstall_config/tasks/main.yml | 2 -- roles/supervised_install/tasks/main.yml | 9 +++------ 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/roles/fail2ban/handlers/main.yml b/roles/fail2ban/handlers/main.yml index 3f65528..f265c4b 100644 --- a/roles/fail2ban/handlers/main.yml +++ b/roles/fail2ban/handlers/main.yml @@ -8,5 +8,3 @@ - name: restart home assistant shell: | ha core restart - args: - warn: no \ No newline at end of file diff --git a/roles/harden_os/tasks/patching.yml b/roles/harden_os/tasks/patching.yml index 7b74b90..6e7314d 100644 --- a/roles/harden_os/tasks/patching.yml +++ b/roles/harden_os/tasks/patching.yml @@ -17,7 +17,6 @@ args: creates: /etc/apt/apt.conf.d/20auto-upgrades executable: /bin/bash - warn: no - name: Configure unattended upgrades template: @@ -25,4 +24,4 @@ dest: /etc/apt/apt.conf.d/50unattended-upgrades owner: root group: root - mode: '0644' \ No newline at end of file + mode: '0644' diff --git a/roles/install_hacs/handlers/main.yml b/roles/install_hacs/handlers/main.yml index 83eb7f6..c62692a 100644 --- a/roles/install_hacs/handlers/main.yml +++ b/roles/install_hacs/handlers/main.yml @@ -1,5 +1,3 @@ - name: restart home assistant shell: | ha core restart - args: - warn: false diff --git a/roles/preinstall_config/tasks/main.yml b/roles/preinstall_config/tasks/main.yml index 0a643a6..8012d85 100644 --- a/roles/preinstall_config/tasks/main.yml +++ b/roles/preinstall_config/tasks/main.yml @@ -28,8 +28,6 @@ fi register: switch_to_cgroup_v1 changed_when: switch_to_cgroup_v1.stdout is search('Switching to cgroup v1') - args: - warn: false when: firmware_cmdline.stat.exists | bool diff --git a/roles/supervised_install/tasks/main.yml b/roles/supervised_install/tasks/main.yml index bbce5c4..5a6c042 100644 --- a/roles/supervised_install/tasks/main.yml +++ b/roles/supervised_install/tasks/main.yml @@ -50,8 +50,6 @@ ping -c 3 -6 version.home-assistant.io check_mode: false changed_when: false - args: - warn: false rescue: - name: Disable IPv6 to prevent Home Assistant install hang ansible.builtin.lineinfile: @@ -83,7 +81,8 @@ when: resolve_conf_override_result is changed when: supervised_install_resolve_conf_overrides is defined -- name: Get download url for latest os-agent .deb release +# use shell module so we can parse the output with shell commands +- name: Get download url for latest os-agent .deb release # noqa: command-instead-of-module shell: | curl -s https://api.github.com/repos/home-assistant/os-agent/releases/latest \ | grep "browser_download_url.*{{ arch[ansible_architecture]['os_agent'] }}.deb" \ @@ -92,9 +91,7 @@ register: os_agent_latest_url failed_when: os_agent_latest_url.stdout is not search('os-agent_.*_linux_.*.deb') changed_when: false - check_mode: no - args: - warn: false + check_mode: false - name: Install os-agent apt: