forked from saratov/infra
d89c7ab77e
firts we check that the VM has already get some IP address and if so we just deploy as usual. If VM have no IP address on any interface we throw all interfaces except first (eth0) to the `empty vlan` that have no DHCP server enabled. VLAD ID defined in environment variable. After network configuration inside VM we restore propper VLAN IDs on all interfaces. This approach should help in situations when DHCP available on more than one interfaces and those interfaces configured as dhcp-clients, thus more than one default gw will be configured with some metrics and all traffic will be routed to the right one or will be not. |
||
---|---|---|
docs | ||
library | ||
nix | ||
plugins | ||
roles | ||
vars | ||
.gitignore | ||
.gitmodules | ||
ansible.cfg | ||
infra.sh | ||
make-example-stack.yml | ||
provision.yml | ||
README.md | ||
shell.nix |
Prepare
install prerequired ansible 2.6+ and python modules
apt-get install ansible python-module-proxmoxer python-module-jmespath python-module-netaddr
init submodules and pull infra-conf repository
export CONF_URI="http://gogs.srt/BaseALT/infra-conf.git"
git submodule update --init --recursive
git subtree add --prefix=vars/conf "${CONF_URI}" master
ssh-add ~/.ssh/robot_key
do not forget to add robot ssh-key and clone passdb
deploy desired stack
./infra.sh test-env test-stack