Remove redundant python-apt install #2285
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements the first half of issue #2284
Ansible automatically installs the python-apt package when using
the 'apt' Ansible module, if python-apt is not present. This patch
removes the (unneeded) explicit installation in the Kubespray
'preinstall' role.
Current Ansible code can be seen here: https://github.com/ansible/ansible/blob/7d721c1ec5d4066547c4b7bf51d452d956ae366a/lib/ansible/modules/packaging/os/apt.py#L888
And it's been there since 2013: ansible/ansible#4079
Fairly confident that this behavior won't change upstream, and even it does, the python-apt install in Kubespray won't work as is since it is using the 'apt' module that depends on the 'python-apt' package.
Tested by uninstalling python-apt/python-apt-common/python3-apt from an Ubuntu 16.04.3 Server, running Kubespray against it, and then validating a functioning deployment + presence of the python-apt package.