feat(install): dont allow installation to continue if the hostname does not match inventory_hostname
!35
This commit is contained in:
		| @ -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 | - name: Firewall Rules | ||||||
|   ansible.builtin.include_role: |   ansible.builtin.include_role: | ||||||
|     name: nfc_firewall |     name: nfc_firewall | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user