diff --git a/ansible/dmz.conf b/ansible/dmz.conf.j2 similarity index 75% rename from ansible/dmz.conf rename to ansible/dmz.conf.j2 index aa141b5..be94440 100644 --- a/ansible/dmz.conf +++ b/ansible/dmz.conf.j2 @@ -1,5 +1,10 @@ auto enp3s0.30 +{% if dmz_interface.enabled %} +iface enp3s0.30 inet dhcp + hwaddress ether {{ dmz_interface.mac }} +{% else %} iface enp3s0.30 inet manual +{% endif %} iface enp3s0.30 inet6 auto accept_ra 0 dhcp 0 diff --git a/ansible/hypervisors.yml b/ansible/hypervisors.yml index c29dfa0..4746b3b 100644 --- a/ansible/hypervisors.yml +++ b/ansible/hypervisors.yml @@ -32,8 +32,8 @@ pre_tasks: - name: Copy interfaces configuration - copy: - src: dmz.conf + template: + src: dmz.conf.j2 dest: /etc/network/interfaces.d/dmz.conf register: interfaces @@ -53,6 +53,6 @@ - {role: ssh_ca_known_hosts, tags: ssh_ca_known_hosts} - {role: deploy_ssh_certificates, tags: deploy_ssh_certificates} -- hosts: atlas, jefke - roles: - - {role: borg, tags: borg} +# - hosts: atlas, jefke +# roles: +# - {role: borg, tags: borg} diff --git a/ansible/inventory/host_vars/atlas/main.yml b/ansible/inventory/host_vars/atlas/main.yml new file mode 100644 index 0000000..77d1db9 --- /dev/null +++ b/ansible/inventory/host_vars/atlas/main.yml @@ -0,0 +1,2 @@ +dmz_interface: + enabled: false diff --git a/ansible/inventory/host_vars/jefke/main.yml b/ansible/inventory/host_vars/jefke/main.yml new file mode 100644 index 0000000..77d1db9 --- /dev/null +++ b/ansible/inventory/host_vars/jefke/main.yml @@ -0,0 +1,2 @@ +dmz_interface: + enabled: false diff --git a/ansible/inventory/host_vars/lewis/main.yml b/ansible/inventory/host_vars/lewis/main.yml new file mode 100644 index 0000000..09199a6 --- /dev/null +++ b/ansible/inventory/host_vars/lewis/main.yml @@ -0,0 +1,3 @@ +dmz_interface: + enabled: true + mac: "ca:fe:c0:ff:ee:0b"