feat: read Salt-Cloud Maps from the Pillar #47742
What does this PR do?
Enable use of cloud map data sourced from the Pillar.
salt-call cloud.map_run map_pillar=my-prd-map
cloud: maps: my-prd-map: named-profile-01: - named-instance-01 - named-instance-02
To preserve backwards compatibility the
The implementation is in two parts: (1) add maps data from the pillar at
What issues does this PR fix or reference?
Allow loading map data from a file or from a JSON data structure via CLI.
Add a pillar-based option to the existing map data.
No so far, but what sort of tests should this have?
Commits signed with GPG?
The text was updated successfully, but these errors were encountered:
- The function signature `def map_run(path=None, **kwargs):`, so doesn't need to change. - Adding support for Cloud Maps in Pillar builds on the strength of the dynamic pillar-centric data organizing scheme. - in `Map.__init__`, a file path is read in as the class's `self.rendered_map` by the `Map.read` function, (which locates the file using the file path that the CloudClient is where most of the functionality is collected and it gets a copy of pillar values here (https://github.com/saltstack/salt/blob/develop/salt/cloud/init.py#L194-L206). (doc) - added usage and precedence info to `map_run()` at modules/cloud.py - added example pillar to topics/cloud/config.rst - corrected YAML indentation of example 7 in topics/cloud/map.rst