Just want to know what everyone is doing around reducing duplication of pillar data for pillars that need to share values? is there any consensus on "best practice"?. So far the only thing I've seen that helps is by creating jinja files and using load_yaml then referencing it in pillar.
{% import_yaml
"/srv/salt/pillar/auto/managed_password.yaml" as pass with
context %}
mysql:
user:
user1:
password: "{{ pass['user1']['mysql'] }}"
2 pillars using same rabbitmq host
/srv/pillar/openstack/cinder.slscinder:rabbitmq:host: 192.168.1.1user: adminpassword: blah/srv/pillar/openstack/nova.slsnova:rabbitmq:host: 192.168.1.1user: adminpassword: blah
{% for h in
salt['pillar.get']('mykey:rabbitmq', {}).itemps() %}
/srv/pillar/openstack/{{ h }}.sls
{{ h }}:
rabbitmq:
host: 192.168.1.1
user: admin
password: blah
{% endfor %}
-- Sylvain Viart - Consultant informatique système linux