I would like to pass a variable into an AST query in my powershell script. 
eg. in the query below I would like to use $role instead of "avrt". Is it 
possible? Getting an error when I tired it.

$trusted_facts = @{
  query = '["from", "facts",
  ["and",
    ["=", "name", "trusted"],
    ["subquery", "facts",
      ["and",
        ["subquery", "fact_contents",
          ["and",
            ["~>", "path", ["trusted", "extensions", "pp_role"]],
            ["=", "value", "avrt"]
          ]
        ],
        ["subquery", "fact_contents",
          ["and",
            ["~>", "path", ["trusted", "extensions", "pp_apptier"]],
            ["=", "value", "production"]
          ]
        ]
      ]
    ]
  ]
]'
}

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d7b5e767-1f2f-4a5b-864e-f3d57e228dda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to