setup script does all from vagrant up to check upgrade'
This commit is contained in:
parent
d54b537240
commit
aa4cd65e69
|
@ -18,22 +18,14 @@ box. This implies that all ansible commands must be run from the
|
||||||
`ansible-experiments/package_updates` folder.
|
`ansible-experiments/package_updates` folder.
|
||||||
|
|
||||||
A small script `setup-requirements` is provided, that initializes everything,
|
A small script `setup-requirements` is provided, that initializes everything,
|
||||||
to be executed after the vagrant boxes came online. It will generate an
|
including doing a vagrant up. It will generate an ssh-config for said vagrant
|
||||||
ssh-config for said vagrant boxes, download roles from galaxy, and make a
|
boxes, download roles from galaxy, and make a base-install for the hosts
|
||||||
base-install for the hosts (installing python dependencies, ansible itself
|
(installing python dependencies, ansible itself on ubuntu1, a deploying an ssh
|
||||||
on ubuntu1, a deploying an ssh key to all nodes to be used from the vagrant box
|
key to all nodes to be used from the vagrant box `ubuntu1`, as
|
||||||
`ubuntu1`, as ansible controller machine.)
|
ansible controller machine.)
|
||||||
|
|
||||||
When deploying and setting up from the machine where vagrant runs, you need to
|
When deploying and setting up from the machine where vagrant runs, you need to
|
||||||
add some extra arguments:
|
add some extra arguments:
|
||||||
`--ssh-extra-args "-F ./vagrant-ssh-config" --inventory hosts-vagrant`
|
`--ssh-extra-args "-F ./vagrant-ssh-config" --inventory hosts-vagrant`
|
||||||
to ansible execution. These are not necessary once running ansible from
|
to ansible execution. These are not necessary once running ansible from
|
||||||
`ubuntu1`.
|
`ubuntu1`.
|
||||||
|
|
||||||
## BUGS
|
|
||||||
|
|
||||||
The vagrant setup seems to have a provisioning bug, that kicks in with the
|
|
||||||
latest 18.04 Ubuntu. The FreeBSD boxes also experience a provisioning problem,
|
|
||||||
with the same result: the second, private network interface does not get
|
|
||||||
configured. As these interfaces are used to run ansible from `ubuntu1`, I could
|
|
||||||
not fully test the scripts from there.
|
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x
|
|
||||||
set -e
|
# c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t
|
||||||
|
# vi: set shiftwidth=4 tabstop=4 noexpandtab:
|
||||||
|
# :indentSize=4:tabSize=4:noTabs=false:
|
||||||
|
|
||||||
|
set -o nounset
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
|
||||||
|
vagrant up
|
||||||
vagrant ssh-config > vagrant-ssh-config
|
vagrant ssh-config > vagrant-ssh-config
|
||||||
ansible-galaxy install -r roles/requirements.yml
|
ansible-galaxy install -r roles/requirements.yml
|
||||||
ansible-playbook --ssh-extra-args "-F ./vagrant-ssh-config" --inventory hosts-vagrant base-setup.yml
|
ansible-playbook --ssh-extra-args "-F ./vagrant-ssh-config" --inventory hosts-vagrant base-setup.yml
|
||||||
|
|
Loading…
Reference in a new issue