diff options
author | Mohammed Naser <mnaser@vexxhost.com> | 2017-05-14 13:11:23 -0400 |
---|---|---|
committer | Brian Coca <bcoca@users.noreply.github.com> | 2017-05-14 14:10:38 -0400 |
commit | f9b44990829c5d17d1ee5f0cb4a5dcc16bcc1aca (patch) | |
tree | b0cd9f55b786c396e8693033f8b3f19263ddc820 | |
parent | fdcad0f44d0a10470be7270196765bf1f46864d4 (diff) | |
download | ansible-f9b44990829c5d17d1ee5f0cb4a5dcc16bcc1aca.tar.gz |
Set facts type to dict
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>
This was originally fixed and found in the Ansible Puppet role which
is maintained by the OpenStack infrastructure team.
https://github.com/openstack-infra/ansible-role-puppet/commit/8d0f0bfd0a7288b4bdc2782ed2d1dcf626e8a3ba
-rw-r--r-- | lib/ansible/modules/system/puppet.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/modules/system/puppet.py b/lib/ansible/modules/system/puppet.py index 602f4bda10..7d33ea43e2 100644 --- a/lib/ansible/modules/system/puppet.py +++ b/lib/ansible/modules/system/puppet.py @@ -169,7 +169,7 @@ def main(): show_diff=dict( # internal code to work with --diff, do not use default=False, aliases=['show-diff'], type='bool'), - facts=dict(default=None), + facts=dict(default=None, type='dict'), facter_basename=dict(default='ansible'), environment=dict(required=False, default=None), certname=dict(required=False, default=None), |