create bootstrap_vms role to run vagrant file on host, creating managed vms (dkhost03 and dkhost04)

This commit is contained in:
2017-06-06 09:31:12 -04:00
parent 7374d7767b
commit a05d635641
18 changed files with 275 additions and 71 deletions

View File

@@ -0,0 +1,32 @@
---
# bootstrap vms on host machine
# install required system packages
- name: install system packages
apt:
state: present
name: "{{item}}"
update_cache: yes
with_items: []
# copy across vagrant file
- name: create target folder
file:
state: directory
dest: "{{ vagrant_folder }}"
- name: copy vagrant file
copy:
src: Vagrantfile
dest: "{{ vagrant_folder }}/Vagrantfile"
# update and run vagrant boxes
- name: update vagrant box
command: vagrant box update
args:
chdir: "{{vagrant_folder}}"
- name: vagrant up
command: vagrant up
args:
chdir: "{{vagrant_folder}}"