forked from freeipa/freeipa-pr-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_template_box.yml
46 lines (43 loc) · 1.12 KB
/
create_template_box.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
---
- hosts: localhost
name: prepare vagrant box
become_user: root
vars_prompt:
- name: fedora_version
prompt: fedora
private: false
default: 27
- name: git_branch
prompt: "git branch"
private: false
default: "master"
vars_files:
- vars/fedora/{{ fedora_version }}.yml
- vars/ipa_branches/{{ git_branch }}.yml
pre_tasks:
- set_fact:
template_box_name: "ci-{{ git_branch }}-f{{ fedora_version }}"
roles:
- box/prepare
# HACK: workaround to install Python2 that is still required by Ansible
- hosts: image_box
gather_facts: false
tasks:
- name: install python and deps for ansible modules
raw: test -e /usr/bin/python || dnf install -y python2 python2-dnf libselinux-python
- name: gather facts
setup:
- hosts: image_box
name: modify vagrant box template
vars_files:
- vars/fedora/{{ fedora_version }}.yml
- vars/ipa_branches/{{ git_branch }}.yml
roles:
- role: builder
git_version: "{{ git_branch }}"
- role: machine
- hosts: localhost
name: package template box
become_user: root
roles:
- box/package