feat(install): dont allow installation to continue if the hostname does not match inventory_hostname

!35
This commit is contained in:
2024-03-12 21:28:14 +09:30
parent 3b760db6e7
commit f1d20aac80

View File

@ -1,5 +1,19 @@
---
- name: Get Hostname
ansible.builtin.command:
cmd: hostname
changed_when: false
register: hostname_to_check
- name: Hostname Check
ansible.builtin.assert:
that:
- hostname_to_check.stdout == inventory_hostname
msg: The hostname must match the inventory_hostname
- name: Firewall Rules
ansible.builtin.include_role:
name: nfc_firewall