From 5abf0f4ccc19cf1e012fae3046852500aac71acd Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 17 Jun 2017 11:00:52 -0400 Subject: [PATCH] add dkhost01 to vagrant --- home.xai-corp.net.yml | 6 ++++ roles/bootstrap_vms/tasks/main.yml | 4 +-- .../Vagrantfile => templates/Vagrantfile.j2} | 31 +++++++++++++++++-- roles/rsyslog/templates/49-shiptograylog.j2 | 2 +- 4 files changed, 38 insertions(+), 5 deletions(-) rename roles/bootstrap_vms/{files/Vagrantfile => templates/Vagrantfile.j2} (74%) diff --git a/home.xai-corp.net.yml b/home.xai-corp.net.yml index d7c8c66..fbbb658 100644 --- a/home.xai-corp.net.yml +++ b/home.xai-corp.net.yml @@ -1,5 +1,7 @@ --- # playbook to install tools on home.xai-corp.net + # + # - hosts: home remote_user: ansible @@ -12,6 +14,10 @@ - git cron: - { name: "zoneedit", file: "zoneedit" } + + vm: + bridge_network: enp3s0 + # datadog_api_key: ca0faf176c4aedd4f547ed7cf85615eb # datadog_checks: # system: diff --git a/roles/bootstrap_vms/tasks/main.yml b/roles/bootstrap_vms/tasks/main.yml index 408e18d..6511db6 100644 --- a/roles/bootstrap_vms/tasks/main.yml +++ b/roles/bootstrap_vms/tasks/main.yml @@ -16,8 +16,8 @@ dest: "{{ vagrant_folder }}" - name: copy vagrant file - copy: - src: Vagrantfile + template: + src: Vagrantfile.j2 dest: "{{ vagrant_folder }}/Vagrantfile" # update and run vagrant boxes diff --git a/roles/bootstrap_vms/files/Vagrantfile b/roles/bootstrap_vms/templates/Vagrantfile.j2 similarity index 74% rename from roles/bootstrap_vms/files/Vagrantfile rename to roles/bootstrap_vms/templates/Vagrantfile.j2 index 1cd9cb4..4962c9f 100644 --- a/roles/bootstrap_vms/files/Vagrantfile +++ b/roles/bootstrap_vms/templates/Vagrantfile.j2 @@ -2,7 +2,7 @@ # vi: set ft=ruby : BASE_BOX = "ubuntu/xenial64" -BRIDGE_NET = "enp3s0" +BRIDGE_NET = "{{vm.bridge_network}}" $script = <