Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2061

The augments_file is not loaded early enough to define additional inputs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.1
    • Component/s: None
    • Labels:
      None

      Description

      <pre>
      #+begin_src sh
      vagrant ssh hub
      sudo -i
      export COMMIT=e1b7b4646dbcecfe35cb3c7471401850a29909ac
      wget https://github.com/nickanderson/cfengine-ssh/archive/$COMMIT.tar.gz -O /tmp/$COMMIT.tar.gz
      tar -C /tmp -zxf /tmp/$COMMIT.tar.gz
      rm -f /tmp/$COMMIT.tar.gz
      mv cfengine-ssh-$COMMIT /var/cfengine/masterfiles/services/ssh
      #+end_src
      </pre>

      Now that I have the policy extracted in my masterfiles tree I need
      to include it in my inputs. Lets use the augments_file. You can see
      an example in the masterfiles repository.
      https://github.com/cfengine/masterfiles/blob/3.7.0/example_def.json

      <pre>
      #+begin_src sh
      cat > test2.json <<EOF
      {
      "inputs": [ "services/ssh/def.cf" ]
      }
      EOF
      #+end_src
      </pre>

      I just added the entry to my ssh policy to inputs, now I just need
      to make sure my bundles get activated.

      Unfortunately at the time of this writing you can't specify inputs
      in the augments_file that define bundles used in autorun. If you
      try you will get an 'Undefinded bundle' error.

      Activating the policy from a methods promise also fails:
      <pre>
      #+begin_example
      [root@hub masterfiles]# cf-agent -KIf ./promises.cf -DDEBUG -b def,inventory_ssh_host_key_fingerprints
      info: Using command line specified bundlesequence
      error: Bundle 'inventory_ssh_host_key_fingerprints' listed in the bundlesequence was not found
      error: Fatal CFEngine error: Errors in agent bundles
      #+end_example
      </pre>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10042 Nick Anderson
                Reporter:
                a10042 Nick Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Not Specified
                  Logged:
                  Time Not Required
                  Not Specified