From 8d0f0bfd0a7288b4bdc2782ed2d1dcf626e8a3ba Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 12 Jan 2017 09:55:37 -0800 Subject: [PATCH] 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 # Change-Id: Iea626466d0920349f434f678fe2f71cbee259383 --- library/puppet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/puppet b/library/puppet index b45716d..2972448 100644 --- a/library/puppet +++ b/library/puppet @@ -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),