-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitlab-ci.yml
32 lines (29 loc) · 908 Bytes
/
gitlab-ci.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
stages:
- validate
- deploy
- test
batfish-validation:
stage: validate
script:
- chmod 755 automation
- cp configs/*.yml automation/host_vars/
- cd automation
- ansible-galaxy install -r requirements.yml
- ansible-playbook -e 'ansible_python_interpreter=/usr/bin/python3' playbooks/validate.yaml
deploy-configurations:
stage: deploy
script:
- chmod 755 automation
- cp configs/*.yml automation/host_vars/
- cd automation
- ansible-galaxy install -r requirements.yml
- ansible-playbook -e 'ansible_python_interpreter=/usr/bin/python3' playbooks/intended.yaml
ping-test:
stage: test
script:
- chmod 755 automation
- cp configs/*.yml automation/host_vars/
- cd automation
- chmod 400 demo.key
- ansible-galaxy install -r requirements.yml
- ansible-playbook -e 'ansible_python_interpreter=/usr/bin/python3' playbooks/ping.yaml