From b64a2b5b5065f6bce439da959a38600ec6c65e37 Mon Sep 17 00:00:00 2001 From: rblundon Date: Sat, 22 Mar 2025 17:00:55 -0500 Subject: [PATCH] add vault file --- 10-sno-hub-cluster/02-dhcp/ip-reservations.yml | 4 +++- 10-sno-hub-cluster/install.yml | 2 +- 10-sno-hub-cluster/vars.yml | 5 ----- group_vars/all.yml | 9 +++++++++ group_vars/vault.yml | 7 +++++++ 5 files changed, 20 insertions(+), 7 deletions(-) delete mode 100644 10-sno-hub-cluster/vars.yml create mode 100644 group_vars/all.yml create mode 100644 group_vars/vault.yml diff --git a/10-sno-hub-cluster/02-dhcp/ip-reservations.yml b/10-sno-hub-cluster/02-dhcp/ip-reservations.yml index 01531c9..34e08ba 100644 --- a/10-sno-hub-cluster/02-dhcp/ip-reservations.yml +++ b/10-sno-hub-cluster/02-dhcp/ip-reservations.yml @@ -16,9 +16,11 @@ - name: Add host reservation to dnsmasq ansible.builtin.lineinfile: path: /etc/dnsmasq.d/hosts.conf - line: "dhcp-host={{ mac_address }},{{ ip_address }},{{ hostname }}" + regexp: "^dhcp-host={{ mac_address }}" + line: "dhcp-host={{ mac_address }},{{ ip_address }} #{{ hostname }}" state: present become: true + - name: Restart dnsmasq service ansible.builtin.service: name: dnsmasq diff --git a/10-sno-hub-cluster/install.yml b/10-sno-hub-cluster/install.yml index a6fcd35..054a7b3 100644 --- a/10-sno-hub-cluster/install.yml +++ b/10-sno-hub-cluster/install.yml @@ -3,7 +3,7 @@ hosts: 127.0.0.1 connection: local gather_facts: true - vars_files: vars.yml + #vars_files: ../vars.yml vars_prompt: - name: freeipa_password diff --git a/10-sno-hub-cluster/vars.yml b/10-sno-hub-cluster/vars.yml deleted file mode 100644 index 143c646..0000000 --- a/10-sno-hub-cluster/vars.yml +++ /dev/null @@ -1,5 +0,0 @@ - -vars: - mac_address: "98:b7:85:1e:c6:f1" - ip_address: "10.1.71.10" - hostname: "ocp-hub" diff --git a/group_vars/all.yml b/group_vars/all.yml new file mode 100644 index 0000000..9ace6b1 --- /dev/null +++ b/group_vars/all.yml @@ -0,0 +1,9 @@ +--- +# Variables for Free-IPA +freeipa_user: "admin" +freeipa_password: "{{ vault_freeipa_password }}" + +# Variables for 10-sno-hub-cluster +mac_address: "98:b7:85:1e:c6:f1" +ip_address: "10.1.71.10" +hostname: "ocp-hub" diff --git a/group_vars/vault.yml b/group_vars/vault.yml new file mode 100644 index 0000000..9fbe4c0 --- /dev/null +++ b/group_vars/vault.yml @@ -0,0 +1,7 @@ +$ANSIBLE_VAULT;1.1;AES256 +66333237373037343133313262646464353636633036383862353132313734626533326536643561 +6430343766306631346664306135626637613064376331370a353464353861343337666337306434 +38313138376133623362363935366233636265323936373138323736656438613233336232383762 +3935653063396436360a303566333932343161643064363663373634633432663234336461353265 +61633534646132626531373466343937656138643737393566613063366639326134396137653437 +6132393536353736373965663431633361636361326638666364