blob: c0c50a4a142bd5b0690b9183c97c114e53f4ceca [file] [log] [blame]
sgudzf0ff0302018-01-29 18:50:01 +02001{% from 'cookied-bm-ocata-cicd-pipeline/underlay.yaml' import HOSTNAME_CFG01 with context %}
2
3- description: Approve cfg01 ssh key for jenkins user
4 cmd: mkdir -p /var/lib/jenkins/.ssh && ssh-keyscan cfg01 > /var/lib/jenkins/.ssh/known_hosts && chown jenkins /var/lib/jenkins/.ssh/known_hosts
5 node_name: {{ HOSTNAME_CFG01 }}
6 retry: {count: 1, delay: 15}
7 skip_fail: false
8
9- description: Install jq for parse json output
10 cmd: apt install -y jq
11 node_name: {{ HOSTNAME_CFG01 }}
12 retry: {count: 1, delay: 15}
13 skip_fail: false
14
15# Install support services
16- description: Install keepalived on ctl01
17 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
18 -C 'I@keepalived:cluster and *01*' state.sls keepalived
19 node_name: {{ HOSTNAME_CFG01 }}
20 retry: {count: 1, delay: 10}
21 skip_fail: true
22
23- description: Install keepalived
24 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
25 -C 'I@keepalived:cluster' state.sls keepalived
26 node_name: {{ HOSTNAME_CFG01 }}
27 retry: {count: 1, delay: 10}
28 skip_fail: false
29
30- description: Install haproxy
31 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
32 -C 'I@haproxy:proxy' state.sls haproxy
33 node_name: {{ HOSTNAME_CFG01 }}
34 retry: {count: 1, delay: 5}
35 skip_fail: false
36
37- description: Check haproxy status
38 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
39 -C 'I@haproxy:proxy' service.status haproxy
40 node_name: {{ HOSTNAME_CFG01 }}
41 retry: {count: 1, delay: 5}
42 skip_fail: false
43
44- description: Restart rsyslog
45 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
46 -C 'I@haproxy:proxy' service.restart rsyslog
47 node_name: {{ HOSTNAME_CFG01 }}
48 retry: {count: 1, delay: 5}
49 skip_fail: false