Browse Source

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>

Change-Id: Iea626466d0920349f434f678fe2f71cbee259383
changes/76/419576/1
James E. Blair 2 years ago
parent
commit
8d0f0bfd0a
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      library/puppet

+ 1
- 1
library/puppet View File

@@ -163,7 +163,7 @@ def main():
163 163
             show_diff=dict(
164 164
                 # internal code to work with --diff, do not use
165 165
                 default=False, aliases=['show-diff'], type='bool'),
166
-            facts=dict(default=None),
166
+            facts=dict(default=None, type='dict'),
167 167
             facter_basename=dict(default='ansible'),
168 168
             environment=dict(required=False, default=None),
169 169
             certname=dict(required=False, default=None),

Loading…
Cancel
Save