-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (40 loc) · 1.35 KB
/
.travis.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
language: generic
os:
- linux
- osx
dist: bionic
addons:
apt:
sources:
- sourceline: "ppa:ansible/ansible"
packages:
- python
- python-pip
- ansible
homebrew:
packages:
- ansible
env:
- PATH=$PATH:$HOME/.gem/ruby/2.4.0/bin
before_install:
- cp inventory.ci inventory
- cp extra_vars.yml.sample extra_vars.yml
- sed -Ei.bk "s/^(docker.) true/\1 false/" extra_vars.yml
- sed -Ei.bk "s/^(ruby.) true/\1 false/" extra_vars.yml
- echo "[defaults]" > ansible.cfg
- echo "callback_whitelist = profile_tasks" >> ansible.cfg
- ansible --version
# lots of cask installs seems to fail on CI.
- "echo 'homebrew_cask_package_list: \n' >> extra_vars.yml"
- "echo ' - visual-studio-code\n' >> extra_vars.yml"
- "echo 'homebrew_package_list: \n' >> extra_vars.yml"
- "echo ' - tmux\n' >> extra_vars.yml"
- "echo ' - gnu-tar\n' >> extra_vars.yml"
- "echo ' - go\n' >> extra_vars.yml"
- "echo ' - wget\n' >> extra_vars.yml"
install:
# try to upgrade ansible
- if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then brew upgrade ansible; fi
script:
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then ansible-playbook -i inventory --extra-vars @extra_vars.yml -vvv dev-vm.yaml; fi
- if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then travis_wait 30 ansible-playbook -i inventory --extra-vars @extra_vars.yml -vvv dev-vm.yaml; fi