The documentation for the `state` field is not very clear.
It says possible values are "installed, uninstalled" and default value is "present"
The examples below alow uses `present` and `absent`.
This patch uses "absent" and "present" instead of "installed" and "uninstalled"
Moreover, this is consistent with other packaging modules, like homebrew itself
* Add support for check mode
* Use "pkgin search" to guarantee 0 or 1 result
* Edit documentation for style, new feature, etc.
* General refactoring
* Lay some groundwork for future support of "state=latest"
Fix `changed` status that always returns False with composer.
This [previous PR](https://github.com/ansible/ansible-modules-extras/pull/61) had fixed the issue but because of a [Composer recent change](cb336a5416) stderr is now used for reporting information meant for humans while stdout is more for the output of the command.
This PR would definilty solve this issue.
Some packages attempt to prompt the user for certain settings during
installation. Thus, this parameter sets the environment variable
$BATCH to 'yes', which forces package installation scripts to accept
default values for these interactive prompts. This should work for all
prompts that have a default value and aren't implemented through a
custom script (as this variable is built into the ports/package system).
FIXME: Package install should fail if it prompts and batch isn't set;
currently, the install hangs indefinitely.
TODO: Allow user to specify the answers to certain prompts.
I (github.com/mwpher) have NOT tested this with any packages besides
bsdstats. It's a small improvement, but not a complete answer to all
the complexities of package installation.
In case of release repositories or other special cases you might not
need the autorefreshing of the repos. This patch adds a configure
option instead of hard enabling this.
Signed-off-by: Justin Lecher <jlec@gentoo.org>