Skip to content

Commit a7453e7

Browse files
committed
Updated made per linter
1 parent 5dcbcb0 commit a7453e7

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tasks/01_detect_disk_devices.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
# The RO indicates if device is read-only (value 1), the awk filters to value 0 - not read-only
2323
- name: Detect available disk devices
2424
ansible.builtin.shell:
25-
cmd: "lsblk -ndo name,mountpoint,ro --include '8,179,259' | awk '/^[a-z]+/ && /0$/{print $1}'"
25+
set -o pipefail &&
26+
lsblk -ndo name,mountpoint,ro --include '8,179,259' | awk '/^[a-z]+/ && /0$/{print $1}'
2627
register: lsblk_devices
2728
changed_when: lsblk_devices.rc == 0
2829

@@ -31,5 +32,7 @@
3132
disk_devices: "{{ lsblk_devices.stdout.splitlines() | map('trim') | list }}"
3233

3334
- name: Set disk_by_id value
34-
ansible.builtin.set_fact: # noqa yaml[line-length]
35-
disk_by_id: "{{ disk_devices | map('extract', hostvars[inventory_hostname]['ansible_devices'], ['links', 'ids', 0]) | list | map('regex_replace', '^(.*)', '/dev/disk/by-id/\\g<1>') | list }}"
35+
ansible.builtin.set_fact:
36+
disk_by_id: >
37+
{{ disk_devices | map('extract', hostvars[inventory_hostname]['ansible_devices'], ['links', 'ids', 0]) |
38+
list | map('regex_replace', '^(.*)', '/dev/disk/by-id/\g<1>') | list }}

tasks/02_setup_motd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- name: Install and Apply Message of the Day Settings Block
66
tags:
7-
- setup_motd
7+
- setup_motd
88
block:
99
# [ Install Packages ]#######################################################
1010
- name: Install packages needed for Message of the Day
@@ -74,7 +74,7 @@
7474
- name: Disable Ubuntu News Advertisement
7575
community.general.ini_file:
7676
path: "/etc/default/motd-news"
77-
section:
77+
section: "null"
7878
option: "ENABLED"
7979
value: "{{ show_ubuntu_news_message }}"
8080
no_extra_spaces: true

0 commit comments

Comments
 (0)