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

Iteration over referenced list does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.6.0
    • Fix Version/s: None
    • Component/s: Evaluation
    • Labels:
      None

      Description

      <pre>
      neil@ettin ~/.cfagent/inputs $ cat bug.cf
      body common control
      {
      bundlesequence =>

      { "efl_global_slists", "test" }

      ;
      }

      bundle agent efl_global_slists
      {
      vars:
      "web_servers" slist =>

      { "1.example.com", "2.example.com", "3.example.com" }

      ;
      }

      bundle agent test
      {
      vars:
      "i" slist =>

      { "1" }

      ;
      "d[${i}][name]" string => "efl_global_slists.web_servers";

      reports:
      "Direct => ${efl_global_slists.web_servers}";
      "Reference => ${${d[${i}][name]}}";
      }
      neil@ettin ~/.cfagent/inputs $ cf-agent -Kf ./bug.cf
      R: Direct => 1.example.com
      R: Direct => 2.example.com
      R: Direct => 3.example.com
      R: Reference => ${efl_global_slists.web_servers}
      </pre>

      Expected results:
      <pre>
      R: Direct => 1.example.com
      R: Direct => 2.example.com
      R: Direct => 3.example.com
      R: Reference => 1.example.com
      R: Reference => 2.example.com
      R: Reference => 3.example.com
      </pre>

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              a10003 Eystein Maloy Stenberg
              Reporter:
              neilhwatson Neil Watson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: