This small change allows for individual setup actions to populate the SETUP_CACHE and not cause a subsequent facts-gathering when not needed. This follows the standard of other facts modules as laid out in #1206 and implemented in fedfd18774. It allows to test of the setup module has already been run even when gather_facts was explicitely disabled.
There's no need to filter hostnamectl's output with awk because its man
page says:
hostnamectl [OPTIONS...] {COMMAND}
--static, --transient, --pretty
If status is used (or no explicit command is given) and one
of those fields is given, hostnamectl will print out just
this selected hostname.
E.g. hostnamectl --static status => ansible.example.org
- unified set attribute functions ... not sure why 2 identical functions
exist with diff names, now there are 3 while i repoint all modules to 1
- fixed issue with symlinks being created w/o existing src when force=no
- refactored conditionals, simplified where possible
- added tests for symlink to nonexistant source, with both force options
- made symlink on existing attomic (force)
Had to shoot the recently merged nova_group module in the head temporarily as it contained a dict comprehension, which means it can't work on all the platforms
and was also breaking docs builds on CentOS. Will engage with list about that shortly.
Tests several ways to specify the repository. For every repo added, the test
asserts that:
* the apt-cache was updated as expected (depends on `update_cache` parameter)
* the PPA key was installed (depends on `repo` format)
The desired behavior is to _not_ add the ppa signing key when check_mode is
enabled. This fix corrects the conditional logic to comply with the stated
behavior.
When one accidentally tries to run this module as a user, he gets the error message that python-apt must be installed, no matter what. Because importing apt will trigger an exception as a regular user. Explicitly catching the ImportError will let the exception bubble. The exception clearly says Permission denied somewhere, and the user has a better idea, what he must fix.