diff --git a/ansible/bluetooth.configure.yml b/ansible/bluetooth.configure.yml index d9861a7..925d115 100644 --- a/ansible/bluetooth.configure.yml +++ b/ansible/bluetooth.configure.yml @@ -22,7 +22,8 @@ name: bluetooth.service state: restarted tasks: - - when: ansible_system == 'Linux' + - name: Configure Bluetooth on Linux systems + when: ansible_system == 'Linux' tags: linux block: - name: Configure how long to stay in discoverable mode before going back to non-discoverable @@ -32,7 +33,7 @@ notify: Restart Bluez ansible.builtin.lineinfile: path: "/etc/bluetooth/main.conf" - line: "DiscoverableTimeout = {{ discoverable_timeout|string|lower }}" + line: "DiscoverableTimeout = {{ discoverable_timeout | string | lower }}" regexp: '^.*DiscoverableTimeout\s*=\s*.*$' insertafter: '^[General]$' mode: '0644' @@ -45,7 +46,7 @@ notify: Restart Bluez ansible.builtin.lineinfile: path: "/etc/bluetooth/main.conf" - line: "FastConnectable = {{ fast_connectable|string|lower }}" + line: "FastConnectable = {{ fast_connectable | string | lower }}" regexp: '^.*FastConnectable\s*=\s*.*$' insertafter: '^[General]$' mode: '0644' @@ -58,7 +59,7 @@ notify: Restart Bluez ansible.builtin.lineinfile: path: "/etc/bluetooth/main.conf" - line: "Name = {{ name|string|lower }}" + line: "Name = {{ name | string | lower }}" regexp: '^.*Name\s*=\s*.*$' insertafter: '^[General]$' mode: '0644' @@ -71,7 +72,7 @@ notify: Restart Bluez ansible.builtin.lineinfile: path: "/etc/bluetooth/main.conf" - line: "AutoEnable = {{ auto_enable|string|lower }}" + line: "AutoEnable = {{ auto_enable | string | lower }}" regexp: '^.*AutoEnable\s*=\s*.*$' insertafter: '^[Policy]$' mode: '0644' diff --git a/ansible/flatpak.configure.yml b/ansible/flatpak.configure.yml index 553656f..76ab0b3 100644 --- a/ansible/flatpak.configure.yml +++ b/ansible/flatpak.configure.yml @@ -16,7 +16,8 @@ flathub_url: https://flathub.org/repo/flathub.flatpakrepo remotes: [] tasks: - - when: ansible_system == 'Linux' + - name: Install and configure Flatpak on Linux systems + when: ansible_system == 'Linux' tags: linux block: - name: Install flatpak @@ -34,8 +35,8 @@ block: - name: Add flathub to the list of remotes of this run when: flathub_enabled - set_fact: - remotes: "{{ remotes + [ { 'name': flathub_name, 'method': flathub_method, 'url': flathub_url } ] }}" + ansible.builtin.set_fact: + remotes: "{{ remotes + [{'name': flathub_name, 'method': flathub_method, 'url': flathub_url}] }}" - name: Enable system remotes tags: - remote diff --git a/ansible/pkg_mgr.configure.yml b/ansible/pkg_mgr.configure.yml index a905d82..fa0dff6 100644 --- a/ansible/pkg_mgr.configure.yml +++ b/ansible/pkg_mgr.configure.yml @@ -24,14 +24,14 @@ installonly_limit: 2 gpgcheck: true tasks: - - name: "Configure {{ ansible_pkg_mgr|upper }}" + - name: "Configure {{ ansible_pkg_mgr | upper }}" when: ansible_pkg_mgr in ['dnf', 'yum'] become: true ansible.builtin.lineinfile: path: "/etc/{{ ansible_pkg_mgr }}/{{ ansible_pkg_mgr }}.conf" - line: "{{ item.key }}={{ item.value|string }}" + line: "{{ item.key }}={{ item.value | string }}" regexp: '^.*{{ item.key }}\s*=\s*.*$' insertafter: '^[main]$' mode: '0644' backup: true - loop: "{{ lookup('vars', [ansible_pkg_mgr, 'config']|join('_') ) | dict2items }}" + loop: "{{ lookup('vars', [ansible_pkg_mgr, 'config'] | join('_')) | dict2items }}" diff --git a/ansible/snap.configure.yml b/ansible/snap.configure.yml index b5ef017..49e3807 100644 --- a/ansible/snap.configure.yml +++ b/ansible/snap.configure.yml @@ -12,7 +12,8 @@ - snapd hosts: all tasks: - - when: ansible_system == 'Linux' + - name: Install and configure Snap on Linux systems + when: ansible_system == 'Linux' tags: linux block: - name: Install snapd diff --git a/ansible/swappiness.configure.yml b/ansible/swappiness.configure.yml index ab4ef1d..e3dd3c1 100644 --- a/ansible/swappiness.configure.yml +++ b/ansible/swappiness.configure.yml @@ -13,13 +13,14 @@ swappiness_sysctl_file_priority: 99 swappiness_value: 10 tasks: - - when: ansible_system == 'Linux' + - name: Configure swappiness on Linux systems + when: ansible_system == 'Linux' tags: linux block: - name: Configure swappiness become: true - sysctl: + ansible.builtin.sysctl: name: vm.swappiness - value: "{{ swappiness_value|string }}" + value: "{{ swappiness_value | string }}" sysctl_file: "{{ swappiness_sysctl_file }}" sysctl_set: true diff --git a/ansible/xcode-cli-tools.install.yml b/ansible/xcode-cli-tools.install.yml index 735657f..720fc2c 100644 --- a/ansible/xcode-cli-tools.install.yml +++ b/ansible/xcode-cli-tools.install.yml @@ -10,7 +10,7 @@ tasks: - name: Pre-flight checks when: ansible_system != 'Darwin' - fail: + ansible.builtin.fail: msg: "Unsupported OS '{{ ansible_system }}'" - name: Check Command Line Tools are already installed check_mode: false diff --git a/ansible/zypper.add-repository.packman.yml b/ansible/zypper.add-repository.packman.yml index 2b84fa0..87dd780 100644 --- a/ansible/zypper.add-repository.packman.yml +++ b/ansible/zypper.add-repository.packman.yml @@ -1,6 +1,6 @@ --- -- name: +- name: Add Packman to Zypper's repositories list tags: - opensuse - packman @@ -12,7 +12,7 @@ ansible_distribution_with_underscores: "{{ ansible_distribution | replace(' ', '_') }}" repo_part_distribution: >- {{ - [ansible_distribution_with_underscores, ansible_distribution_version]|join('_') + [ansible_distribution_with_underscores, ansible_distribution_version] | join('_') if ansible_distribution is search('leap', ignorecase=true) else ansible_distribution_with_underscores }}