It is possible we want our puppet role to run longer then 30mins,
expose the ability for a user to change it.
Change-Id: Id42ba80a5118a9f93e45619ac6ecc5baa774549a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
With newer versions of ansible, module arguments are assumed to
be strings unless otherwise specified. Our 'facts' argument is
expected to be a dictionary, so tell ansible that.
Without this, the argument will arrive as a string and be written
to the facter file inside string quotes. Facter will produce the
following error:
undefined method `each' for #<String:0x000000016ee640>
Change-Id: Iea626466d0920349f434f678fe2f71cbee259383
The README currently says you have to pass puppetmaster, but this is
untrue for puppet apply installs. Add an example playbook to run puppet
without a puppet master.
Change-Id: I6dfb5b97cbca42b83f790310b12a3d49f7dae8a0
This reverts commit e7a06ed55aeac0c09e09bbdade010b9c45c855ce.
This caused the ansible apply test to fail (and therefore
potentially puppet runs from our puppetmaster).
Change-Id: I0db01d128258f78e9b196354799a80774f6c6808
We want the env specific modules to be used first then fall back onto
the normal base module path for any modules missing from the
environment. This means you can test local changes without having a
complete set of modules in your env.
Change-Id: I2f0311400a8cf76b9793f50453e818ed4dd7e5a2
We keep a local copy of this file for operational purposes, but the
upstream one has grown a few things. Sync to make it easier to submit
our local changes upstream.
Change-Id: I84927750fce1a7c6101e8d5c131c0b13020bb6aa
We were copy pastaing code in the puppet cmd generation for noop and
environment handling. Collapse that to make code easier to read and
hopefully avoid future bugs where only one side is edited.
Local testing shows that puppet parses commands like:
puppet apply test.pp --noop
just fine.
Change-Id: Ie7665f72b9327b6b834d358699addf2c60a95ec0
check_mode causes other things that we may want to actually happen
(such as setting up hiera) not to run. This way we can do all of
those but still run puppet in noop.
Change-Id: I32f07a032d28f5c5d04e9eeb50b94f7c0a57ce53
The valid type names can be found in
AnsibleModule._CHECK_ARGUMENT_TYPES_DISPATCHER, and any deviation
from those causes us to no longer be able to puppet any hosts. The
type name for strings is, courtesy of Ansible's implementation being
Python, "str".
Change-Id: Ia4d4cde9926f7506a864739b1b616438c5fe6f43
puppet apply ignores the show-diff option.
Update the code so that both puppet apply and puppet agent
support the show-diff option.
Change-Id: I5b59b8ba8e50a44458d01ec97113a2ce313c1d9a
When moving to ansible 2.1.0.0, we'll need to be more explicity about
our AnsibleModule parameters. Ansible now defaults them to strings.
This will ensure groups is a list.
Change-Id: Ic126c200a432277c0ef406d4406f527d6a3c9fa7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
We are running into OOM issues on puppetmaster.o.o and our current
thought process is because we are using connection: local, this is
causing ansible to fork many times over, which is an expensive task.
Change-Id: I3f2646765f0b442f7533aa7be44fc42b1916f172
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
We should always upload to puppetboard (even when puppet fails) if the
puppetboard server is defined. This allows puppetboard to learn of both
successful and failed puppet runs.
Change-Id: I62a78200052443997baf549256c78b38bd37f63e
On first runs, this logfile is not going to be found. This
is causing ansible to crash and stop applying puppet in consecutive
nodes.
Add a condition to safely fail, and abort play if no files can
be found.
Change-Id: I22a5ebbcaa603b25920fd638211f3663e81e09b0
Bare variables are deprecated in Ansible now, we should wrap them
in jinja stuff so that the deprecation warning goes away.
Change-Id: Ib2bd6ae508eacaa274c16e08fe3ef384e4700776
We want to report as the puppetmaster, not as the host in question.
Change-Id: I0462a898502ad709e046be76c19c9e11f4617335
Depends-On: I290ad569283390bac2a74a9991331c9e86821ab7
The --show-diff option to puppet agent is show-diff, not show_diff.
Also, there is a doc string about which version logdest was added in.
These are not important for Infra. However, keeping in sync makes it
easier to track changes that might actually matter.
Change-Id: Id16b9d7510efa4b8f3645997617cd00ee870e83a
For reasons, ansible adds to hostvars some large blobs. The size of
these blobs causes issues with puppetdb. Removing the two largest and
useless ones until the general solution is solved.
Change-Id: I5800cf1990fc4f97828fa158094e242f8f197d99
Previously the puppetmaster was creating reports directories. Now that
ansible is in charge, it must do it.
Change-Id: I26e1e2ebd45f0c7d75652f9acb9999aee8a3e40c