Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6103

puppet epp render should load local facts by default

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.8.0
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      If epp render is used without a --facts option, it should use local facts for the machine where the command is running.
      If epp render is used with --node option, it should use the facts for the given node if it has called in before.
      When --facts is used the given facts should be merged on top of facts for local node or given node.

      Show
      If epp render is used without a --facts option, it should use local facts for the machine where the command is running. If epp render is used with --node option, it should use the facts for the given node if it has called in before. When --facts is used the given facts should be merged on top of facts for local node or given node.
    • Story Points:
      2
    • Sprint:
      Language 2016-09-07
    • Release Notes Summary:
      The epp render command will now use facts for the local machine where the command is running unless a specific set of facts are given on the command line with {{\--facts}}.

      Description

      puppet epp render should load local facts by default. It's very common when developing code to run local puppet apply evaluations to see what code does. Currently, the fastest way to get a quick render of an erb template is something like:

      $ puppet apply -e 'notice(template("/full/path/to/example.erb"))'
      

      When using EPP templates, you must first save facts to a file

      $ facter --yaml > facts.yaml
      $ puppet epp render ec2data.epp --values_file facts.yaml
      

      Since this is such a common use case, it would be really nice to just load local facts by default if none were provided. Maybe even print out a notice like Notice: no values provided, using local facts.

        Attachments

          Activity

            People

            • Assignee:
              phong Phong Ly
              Reporter:
              ben.ford Ben Ford
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support