aboutsummaryrefslogtreecommitdiff
path: root/roles/guest-configure
diff options
context:
space:
mode:
authorspmfox <spmfox@foxwd.com>2023-06-17 00:43:37 -0400
committerspmfox <spmfox@foxwd.com>2023-06-17 00:43:37 -0400
commit44646dacd59db844e039a9ca566c7c48e35abe1b (patch)
tree6a25d4316c807327ff015c719ecec97b76ab58f7 /roles/guest-configure
parentf035f1f259dd617e8d4459008d7e1165ea04c025 (diff)
ansible-lint cleanup
Diffstat (limited to 'roles/guest-configure')
-rw-r--r--roles/guest-configure/tasks/automatic-update.yml6
-rw-r--r--roles/guest-configure/tasks/services.yml2
-rw-r--r--roles/guest-configure/tasks/user.yml12
3 files changed, 10 insertions, 10 deletions
diff --git a/roles/guest-configure/tasks/automatic-update.yml b/roles/guest-configure/tasks/automatic-update.yml
index 71c102e..638328c 100644
--- a/roles/guest-configure/tasks/automatic-update.yml
+++ b/roles/guest-configure/tasks/automatic-update.yml
@@ -1,4 +1,5 @@
- name: RedHat block
+ when: ansible_os_family == "RedHat"
block:
- name: Install dnf-automatic (RedHat)
ansible.builtin.package:
@@ -7,7 +8,6 @@
- name: Enable dnf-automatic systemd service (RedHat)
ansible.builtin.service:
- name: dnf-automatic-install.timer
- enabled: yes
+ name: dnf-automatic-install.timer
+ enabled: true
state: started
- when: ansible_os_family == "RedHat"
diff --git a/roles/guest-configure/tasks/services.yml b/roles/guest-configure/tasks/services.yml
index 56a5626..53cb904 100644
--- a/roles/guest-configure/tasks/services.yml
+++ b/roles/guest-configure/tasks/services.yml
@@ -1,6 +1,6 @@
- name: Enable and start services
ansible.builtin.service:
name: "{{ item }}"
- enabled: yes
+ enabled: true
state: started
loop: "{{ guest_configure_services }}"
diff --git a/roles/guest-configure/tasks/user.yml b/roles/guest-configure/tasks/user.yml
index 5be5b3f..8f3e27d 100644
--- a/roles/guest-configure/tasks/user.yml
+++ b/roles/guest-configure/tasks/user.yml
@@ -16,35 +16,35 @@
when: guest_configure_ssh_key|length > 0
- name: RedHat block
+ when: ansible_os_family == "RedHat"
block:
- name: Add user to sudo group (RedHat)
ansible.builtin.user:
name: "{{ guest_configure_user }}"
groups: "wheel"
- append: yes
+ append: true
- name: Allow wheel group nopasswd in sudoers (RedHat)
- lineinfile:
+ ansible.builtin.lineinfile:
path: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
- when: ansible_os_family == "RedHat"
- name: Debian block
+ when: ansible_os_family == "Debian"
block:
- name: Add user to sudo group (Debian)
ansible.builtin.user:
name: "{{ guest_configure_user }}"
groups: "sudo"
- append: yes
+ append: true
- name: Allow sudo group nopasswd in sudoers (Debian)
- lineinfile:
+ ansible.builtin.lineinfile:
path: /etc/sudoers
state: present
regexp: '^%sudo'
line: '%sudo ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
- when: ansible_os_family == "Debian"