Commit Graph

12 Commits (482f0a8d1c3cf354fb12b9459340025ce27ca6db)

Author SHA1 Message Date
Monty Taylor 9b9464ab89 Revert "Change show_diff to default to yes"
This was originally to match what puppet agent --test is, since the
rest of the options defaulted to on are grabbed from --test. However,
some security concerns have since been raised - namely that since this
is not the same invocation as --test but instead a remote orchestration
of puppet, the fact that passwords leak into the diff is a dangerous
default.

This reverts commit b86762c1806aa7f021a4780d06db2d3937910a62.
2016-12-08 11:33:31 -05:00
Jonathan Mainguy 451a05c1a2 Change show_diff to default to yes, to match what puppet agent --test is, since the rest of the options defaulted to on are grabbed from --test 2016-12-08 11:33:30 -05:00
Brian Coca bd0eeae6ff fixed a few typos fixes #821 2016-12-08 11:33:08 -05:00
Rene Moser 45c370dbb8 puppet: update author to new format 2016-12-08 11:32:49 -05:00
Rene Moser e97399b173 puppet: add --environment support 2016-12-08 11:32:49 -05:00
Rene Moser 4238950a58 puppet: make arg puppetmaster optional
puppetmaster was used to determine if `agent` or `apply` should be used. But puppetmaster is not required by puppet per default. Puppet may have a config or could find out by itself (...) where the puppet master is.

It changed the code so we only use `apply` if a manifest was passed, otherwise we use `agent`.

This also fixes the example, which did not work the way without this change.

~~~
# Run puppet agent and fail if anything goes wrong
- puppet
~~~
2016-12-08 11:32:49 -05:00
Rene Moser 8f9c3efb1d puppet: ensure puppet is in live mode per default
puppet may be configured to operate in `--noop` mode per default.

That is why we must pass a `--no-noop` to make sure, changes are going to be applied.
2016-12-08 11:32:49 -05:00
Rene Moser f91b75db2f puppet: fix missing space between command and arg
Fixes:
~~~
{
    "cmd": "/usr/bin/puppetconfig print agent_disabled_lockfile",
    "failed": true,
    "msg": "[Errno 2] No such file or directory",
    "rc": 2
}
~~~
2016-12-08 11:32:49 -05:00
Monty Taylor b61d270648 Fix octal values for python 2.4 2016-12-08 11:32:48 -05:00
Monty Taylor 15fccb1ea1 Add support for check mode 2016-12-08 11:32:48 -05:00
Monty Taylor 32c5c00cde Fix some errors pointed out by travis 2016-12-08 11:32:48 -05:00
Monty Taylor 9e2c4efa53 Add module to run puppet
There is a growing pattern for using ansible to orchestrate runs of
existing puppet code. For instance, the OpenStack Infrastructure team
started using ansible for this very reason. It also turns out that
successfully running puppet and interpreting success or failure is
harder than you'd expect, thus warranting a module and not just a shell
command.

This is ported in from
http://git.openstack.org/cgit/openstack-infra/ansible-puppet
2016-12-08 11:32:48 -05:00