From 32073d9720adc0301adb2833ea3ab54283e542f1 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 3 Dec 2022 01:41:00 -0500 Subject: [PATCH] Add config for nat dhcp jail on homeserver. --- ansible/environments/jail/host_vars/homeserver_nat_dhcp | 1 + ansible/environments/jail/hosts | 2 ++ ansible/playbook.yaml | 2 +- ansible/run.bash | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 ansible/environments/jail/host_vars/homeserver_nat_dhcp diff --git a/ansible/environments/jail/host_vars/homeserver_nat_dhcp b/ansible/environments/jail/host_vars/homeserver_nat_dhcp new file mode 100644 index 0000000..1d0b6d9 --- /dev/null +++ b/ansible/environments/jail/host_vars/homeserver_nat_dhcp @@ -0,0 +1 @@ +os_flavor: "freebsd" diff --git a/ansible/environments/jail/hosts b/ansible/environments/jail/hosts index af5f04e..8e6ff96 100644 --- a/ansible/environments/jail/hosts +++ b/ansible/environments/jail/hosts @@ -1,2 +1,4 @@ [jail] nat_dhcp ansible_connection=jail +homeserver_nat_dhcp ansible_ssh_host=nat_dhcp@172.16.16.2 ansible_connection=sshjail +nat_dhcp@172.16.16.2 ansible_connection=sshjail diff --git a/ansible/playbook.yaml b/ansible/playbook.yaml index 6552d27..258d15c 100644 --- a/ansible/playbook.yaml +++ b/ansible/playbook.yaml @@ -34,7 +34,7 @@ - google_cloud_sdk - ansible -- hosts: nat_dhcp +- hosts: nat_dhcp:homeserver_nat_dhcp vars: ansible_become: True roles: diff --git a/ansible/run.bash b/ansible/run.bash index 8e33196..2f37517 100755 --- a/ansible/run.bash +++ b/ansible/run.bash @@ -24,6 +24,9 @@ elif [ "$target" = "odofreebsd" ]; then ansible-playbook -v -i environments/laptop playbook.yaml --diff --limit odofreebsd "${@}" elif [ "$target" = "jail_nat_dhcp" ]; then ansible-playbook -v -i environments/jail playbook.yaml --diff --limit nat_dhcp "${@}" +elif [ "$target" = "jail_homeserver_nat_dhcp" ]; then + ansible-playbook -v -i environments/jail playbook.yaml --diff --limit homeserver_nat_dhcp "${@}" + # else die 1 "Unrecognized target" fi