forked from jborean93/packer-windoze
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker-setup.yml
30 lines (26 loc) · 876 Bytes
/
packer-setup.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
---
- name: set up local dir with packer json and build files
hosts: localhost
gather_facts: no
vars:
opt_packer_setup_username: vagrant
opt_packer_setup_password: vagrant
opt_packer_setup_headless: true
opt_packer_setup_builder: virtualbox
pre_tasks:
- name: check that the Ansible version is at least 2.5
assert:
that:
- ansible_version.major >= 2
- ansible_version.minor >= 5
msg: packer-windoze requires Ansible 2.5 or newer to run, please upgrade or checkout devel before running
- name: check that the provider is valid
assert:
that:
- opt_packer_setup_builder in ['hyperv', 'virtualbox']
msg: packer-windoze only supports the hyperv and virtualbox provider
- name: check that pywinrm is installed
command: python -c "import winrm"
changed_when: False
roles:
- packer-setup