From ae74d871a7fb41f74b63fd206bda5f402e17330a Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 8 Jan 2021 18:30:23 +0100 Subject: [PATCH] Document install_python_apt option of apt_repository (#72959) * Update lib/ansible/modules/apt_repository.py * Remove unnecessary ignored sanity tests Co-authored-by: Felix Fontein Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com> Co-authored-by: Amin Vakil --- lib/ansible/modules/apt_repository.py | 10 ++++++++++ test/sanity/ignore.txt | 3 --- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/apt_repository.py b/lib/ansible/modules/apt_repository.py index 3918eb1a285..36fe8cf5ce9 100644 --- a/lib/ansible/modules/apt_repository.py +++ b/lib/ansible/modules/apt_repository.py @@ -78,6 +78,16 @@ options: a non-Ubuntu target (for example, Debian or Mint). type: str version_added: '2.3' + install_python_apt: + description: + - Whether to automatically try to install the Python apt library or not, if it is not already installed. + Without this library, the module does not work. + - Runs C(apt-get install python-apt) for Python 2, and C(apt-get install python3-apt) for Python 3. + - Only works with the system Python 2 or Python 3. If you are using a Python on the remote that is not + the system Python, set I(install_python_apt=false) and ensure that the Python apt library + for your Python version is installed some other way. + type: bool + default: true author: - Alexander Saltanov (@sashka) version_added: "0.7" diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index c469eecc475..85110852704 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -73,10 +73,7 @@ lib/ansible/module_utils/urls.py pylint:blacklisted-name lib/ansible/module_utils/urls.py replace-urlopen lib/ansible/modules/apt.py validate-modules:parameter-invalid lib/ansible/modules/apt_key.py validate-modules:parameter-type-not-in-doc -lib/ansible/modules/apt_repository.py validate-modules:doc-default-does-not-match-spec lib/ansible/modules/apt_repository.py validate-modules:parameter-invalid -lib/ansible/modules/apt_repository.py validate-modules:parameter-type-not-in-doc -lib/ansible/modules/apt_repository.py validate-modules:undocumented-parameter lib/ansible/modules/assemble.py validate-modules:nonexistent-parameter-documented lib/ansible/modules/async_status.py use-argspec-type-path lib/ansible/modules/async_status.py validate-modules!skip