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