-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsite.yml
63 lines (50 loc) · 1.48 KB
/
site.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
# Base playbook for cfme installation
#
# Dynamically create host groups based on distribution
#
- hosts: all
tasks:
- name: gather site specific fact data
action: site_facts
- name: group hosts by distribution
action: group_by key={{ansible_distribution}}
#
# For RedHat hosts, register to RHN
#
- hosts: RedHat
tasks:
- include: tasks/rhn_register.yml
when: rhn_enabled
#
# For all other hosts, install CFME
#
- hosts: local
vars_prompt:
- name: "github_token"
prompt: "Enter GitHub Personal API Access Token (refer to https://github.com/blog/1509-personal-api-tokens)"
private: yes
tasks:
- include: tasks/yum_repos.yml
when: use_internal_repos
- name: install cfme from rpm
yum: name={{item}} state=present
register: is_cfme_rpm_installed
ignore_errors: yes
with_items: ['cfme', 'cfme-appliance']
- name: configure rpm-based cfme
shell: /var/www/miq/system/cfme-setup.sh
creates={{vmdb_dir}}/.bundle/config
when: is_cfme_rpm_installed|success
- include: tasks/rbenv.yml
when: is_cfme_rpm_installed|failed
- include: tasks/cfme_install.yml
when: is_cfme_rpm_installed|failed
- include: tasks/cfme_db.yml
when: is_cfme_rpm_installed|failed
- include: tasks/cfme_setup.yml
when: is_cfme_rpm_installed|failed
- include: tasks/vmware_vddk.yml
when: vmware_vddk_url is defined and vmware_vddk_url is string
handlers:
- include: handlers/restart_services.yml