Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Commit

Permalink
Set facts type to dict
Browse files Browse the repository at this point in the history
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
  • Loading branch information
James E. Blair committed Jan 12, 2017
1 parent 3fe078c commit 8d0f0bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/puppet
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,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),
Expand Down

0 comments on commit 8d0f0bf

Please sign in to comment.