-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathtox.ini
96 lines (83 loc) · 2.22 KB
/
tox.ini
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
# configuration to run via tox
[tox]
envlist = vagrant
[testenv]
basepython = python3
skip_install = true
[testenv:vagrant]
description = Build a vagrant box VM then provision with ansible
deps = -rrequirements.txt
passenv =
HOME
ANSIBLE_ARGS
VAGRANT_NO_GUI
VAGRANT_ON_GH
BUILD_PLAYBOOK
whitelist_externals = vagrant
commands_pre =
ansible-galaxy install -r requirements.yml
commands = vagrant {posargs:up}
[testenv:ansible]
description = Run ansible on an existing VM
deps = -rrequirements.txt
passenv =
HOME
BUILD_PLAYBOOK
whitelist_externals = vagrant
commands_pre =
ansible-galaxy install -r requirements.yml -vvv
; vagrant ssh-config > vagrant-ssh
commands = ansible-playbook {env:BUILD_PLAYBOOK:playbook-build.yml} {posargs}
# to run against a specific host:
# tox -e ansible -- --extra-vars "build_hosts=aws"
# to clean build files:
# tox -e ansible -- --tags cleanup
[testenv:update-ansible]
description = Run ansible-galaxy to update role installs
deps = -rrequirements.txt
commands = ansible-galaxy {posargs:install -r requirements.yml --force}
[testenv:update-vagrant]
description = Update aspects of vagrant
passenv =
HOME
whitelist_externals = vagrant
commands =
vagrant box update
vagrant box prune
vagrant plugin install vagrant-vbguest
[testenv:package]
description = Package a built Vagrant box for distribution
deps = -rrequirements.txt
passenv =
HOME
DOCKER_HOST
DOCKER_CERT_PATH
DOCKER_TLS_VERIFY
commands =
ansible-playbook playbook-package.yml {posargs}
[testenv:docs-{update,clean}]
description =
clean: Build the documentation (remove any existing build)
update: Build the documentation (modify any existing build)
deps = -rrequirements-docs.txt
whitelist_externals = rm
commands =
clean: rm -rf docs/_build
sphinx-build -nW --keep-going -b {posargs:html} docs/ docs/_build/{posargs:html}
[testenv:openstack]
description = Retrieve an API Key from OpenStack
deps =
-rrequirements-deploy.txt
passenv =
OS_AUTH_URL
OS_IDENTITY_PROVIDER_URL
OS_PROTOCOL
OS_IDENTITY_API_VERSION
OS_AUTH_TYPE
OS_IDENTITY_PROVIDER
OS_INTERFACE
OS_USERNAME
OS_PROJECT_ID
OS_TOKEN
commands =
openstack {posargs:--help}