added requirement to some tasks for system case to be linux kernel, and added tag

This commit is contained in:
2026-05-27 13:12:08 -04:00
parent 6a2179d7a0
commit 020fcf2c51

View File

@@ -104,7 +104,7 @@
tags:
- lan
- name: Starting SSH hardening
when: harden
when: harden and ansible_facts["system"] == "Linux"
delegate_facts: true
block:
- name: Hardening SSH service for the Linode VPS
@@ -172,7 +172,6 @@
- lan
- name: Creating an administrative user
delegate_facts: true
when: ansible_facts["system"] == "Linux"
block:
- name: In the Linode VPS
delegate_to: "{{ new_instance.instance[ip_pref][0] }}"
@@ -259,6 +258,7 @@
tags:
- lan
- name: Allowing sole SSH access to users in group remote
when: ansible_facts["system"] == "Linux"
delegate_facts: true
block:
- name: In Linode VPS
@@ -278,7 +278,7 @@
register: ssh_gatekept
tags:
- linode
- name: In Linode VPS
- name: In the server
delegate_to: "{{ hostvars[instance]['ansible_default_' ~ ip_pref].address }}"
ansible.builtin.template:
src: sshd_config.d/allowance.conf.j2 # @TODO create corresponding role template file
@@ -296,7 +296,7 @@
tags:
- lan
- name: Setting approved SSH authentication procedures
when: harden
when: harden and ansible_facts["system"] == "Linux"
delegate_facts: true
block:
- name: In the Linode VPS
@@ -333,6 +333,7 @@
register: ssh_authenticator
tags:
- lan
- ssh_secure_auth
- name: Installing core packages
delegate_facts: true
block: