forked from Voronenko/ansible-developer_recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks_vagrant.yml
48 lines (43 loc) · 1.18 KB
/
tasks_vagrant.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
- name: Check if Vagrant is already installed
command: test -x /usr/bin/vagrant
when: ansible_system == "Linux"
ignore_errors: yes
register: vagrant_present
tags:
-vagrant
-setup
- name: Download Vagrant
get_url: url=https://releases.hashicorp.com/vagrant/{{ vagrant_version }}/vagrant_{{ vagrant_version }}_x86_64.deb
dest=/tmp/vagrant_{{ vagrant_version }}_x86_64.deb
when: vagrant_present | failed
become: yes
tags:
-vagrant
-setup
- name: Install Vagrant
apt: deb=/tmp/vagrant_{{ vagrant_version }}_x86_64.deb state=installed
when: vagrant_present | failed
become: yes
tags:
-vagrant
-setup
- name: Vagrant | update dkms
apt: update_cache=yes pkg=dkms state=installed
become: yes
tags:
-vagrant
-setup
- name: Vagrant | update dkms
apt: update_cache=yes pkg=dkms state=installed
become: yes
tags:
-vagrant
-setup
- name: Vagrant | install plugins (default - vbguest, hostsupdater, auto_network)
shell: "vagrant plugin install {{item}}"
become: yes
when: vagrant_plugins is defined
with_items: "{{vagrant_plugins | default(['vbguest', 'hostupdater', 'auto_network'])}}"
tags:
-vagrant
-setup