Install netaddr before running site.yml

Currently, the execution of site.yml fails as site.yml installs
python-netaddr in the same run as it uses it, which fails since
ansible-playbook can't see the newly installed module.

This commit simply removes python-netaddr from
mnaio_host_distro_packages and adds a new task to build.sh to
install it before site.yml is kicked off.

NOTE: This commit also switches to installing netaddr via pip
      instead of system package since that does not require pre-loading
      vars files depending on OS, etc.

Change-Id: I324ba61a860f5942b40972903ae1c40caa7839e5
This commit is contained in:
Matt Thompson 2017-09-06 10:32:45 -04:00
parent cd30dba4fe
commit e5ba32d8fa
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,11 @@ source bootstrap.sh
source ansible-env.rc source ansible-env.rc
ansible mnaio_hosts \
-i playbooks/inventory \
-m pip \
-a "name=netaddr"
ansible-playbook -vv \ ansible-playbook -vv \
-i playbooks/inventory \ -i playbooks/inventory \
-e setup_host=${SETUP_HOST:-"true"} \ -e setup_host=${SETUP_HOST:-"true"} \

View File

@ -23,7 +23,6 @@ mnaio_host_distro_packages:
- openssh-server - openssh-server
- python2.7 - python2.7
- python-software-properties - python-software-properties
- python-netaddr
- qemu-kvm - qemu-kvm
- qemu-utils - qemu-utils
- software-properties-common - software-properties-common