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