blob: 66d38d8113d4a264dd2e75cbdd725fed66c6b1da (
plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
---
- hosts: localhost
vars_files:
- "/etc/mason/mason.conf"
tasks:
- fail: msg='TROVE_ID is mandatory'
when: TROVE_ID is not defined
- fail: msg='TROVE_HOST is mandatory'
when: TROVE_HOST is not defined
- fail: msg='ARTIFACT_CACHE_SERVER is mandatory'
when: ARTIFACT_CACHE_SERVER is not defined
- fail: msg='GERRIT_USER is mandatory'
when: GERRIT_USER is not defined
- fail: msg='GERRIT_HOSTNAME is mandatory'
when: GERRIT_HOSTNAME is not defined
- fail: msg='GERRIT_HTTP_PORT is mandatory'
when: GERRIT_HTTP_PORT is not defined
- fail: msg='GERRIT_GIT_PORT is mandatory'
when: GERRIT_GIT_PORT is not defined
- fail: msg='GERRIT_SSH_KEY_PATH is mandatory'
when: GERRIT_SSH_KEY_PATH is not defined
- fail: msg='GEARMAN_HOST is mandatory'
when: GEARMAN_HOST is not defined
- fail: msg='GEARMAN_PORT is mandatory'
when: GEARMAN_PORT is not defined
- fail: msg='START_GEARMAN is mandatory'
when: START_GEARMAN is not defined
- fail: msg='MASON_CLUSTER_MORPHOLOGY is mandatory'
when: MASON_CLUSTER_MORPHOLOGY is not defined
- fail: msg='MASON_ARCHITECTURE is mandatory'
when: MASON_ARCHITECTURE is not defined
- fail: msg='MASON_TEST_HOSTS is mandatory'
when: MASON_TEST_HOSTS is not defined
- fail: msg='MASON_DISTBUILD_CONTROLLERS is mandatory'
when: MASON_DISTBUILD_CONTROLLERS is not defined
- fail: msg='MASON_TEST_INFRASTRUCTURE_TYPE is mandatory'
when: MASON_TEST_INFRASTRUCTURE_TYPE is not defined
- fail: msg='MASON_UPSTREAM_TROVE is mandatory'
when: MASON_UPSTREAM_TROVE is not defined
- fail: msg='OPENSTACK_NETWORK_ID is mandatory when MASON_TEST_INFRASTRUCTURE_TYPE=openstack'
when: MASON_TEST_INFRASTRUCTURE_TYPE == "openstack" and OPENSTACK_NETWORK_ID is not defined
- fail: msg='OS_USERNAME is mandatory when MASON_TEST_INFRASTRUCTURE_TYPE=openstack'
when: MASON_TEST_INFRASTRUCTURE_TYPE == "openstack" and OS_USERNAME is not defined
- fail: msg='OS_PASSWORD is mandatory when MASON_TEST_INFRASTRUCTURE_TYPE=openstack'
when: MASON_TEST_INFRASTRUCTURE_TYPE == "openstack" and OS_PASSWORD is not defined
- fail: msg='OS_TENANT_NAME is mandatory when MASON_TEST_INFRASTRUCTURE_TYPE=openstack'
when: MASON_TEST_INFRASTRUCTURE_TYPE == "openstack" and OS_TENANT_NAME is not defined
- fail: msg='OS_AUTH_URL is mandatory when MASON_TEST_INFRASTRUCTURE_TYPE=openstack'
when: MASON_TEST_INFRASTRUCTURE_TYPE == "openstack" and OS_AUTH_URL is not defined
- name: Create required configuration files
template: src=/usr/share/mason-setup/{{ item }} dest=/etc/{{ item }}
with_items:
- zuul.conf
- turbo-hipster-config.yaml
- lighttpd.conf
- zuul-layout.yaml
- zuul-logging.conf
- name: Create the OpenStack credentials file
template: src=/usr/share/mason-setup/{{ item }} dest=/etc/{{ item }}
with_items:
- os.conf
when: MASON_TEST_INFRASTRUCTURE_TYPE == "openstack"
- name: Enable the zuul-server service
service: name=zuul-server.service enabled=yes
register: zuul_server_service
- name: Restart the zuul-server service
service: name=zuul-server.service state=restarted
when: zuul_server_service|changed
- name: Enable the zuul-merger service
service: name=zuul-merger.service enabled=yes
register: zuul_merger_service
- name: Restart the zuul-merger service
service: name=zuul-merger.service state=restarted
when: zuul_merger_service|changed
- name: Enable the turbo-hipster service
service: name=turbo-hipster.service enabled=yes
register: turbo_hipster_service
- name: Restart the turbo-hipster service
service: name=turbo-hipster.service state=restarted
when: turbo_hipster_service|changed
- user: name=www comment="Lighttpd user"
- name: Enable the lighttpd service
service: name=lighttpd.service enabled=yes
register: lighttpd_service
- name: Restart the lighttpd service
service: name=lighttpd.service state=restarted
when: lighttpd_service|changed
|