saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
https://docs.saltproject.io/salt/install-guide/en/latest/
Apache License 2.0
14.23k stars 5.49k forks source link

Reactors share the same yaml namespace #9277

Closed whiskybar closed 7 years ago

whiskybar commented 10 years ago

master.conf:

reactor:
  - 'tag1':
    - file1.sls
    - file2.sls

file1.sls:

formula1:
  cmd.cmd.run:
    - tgt: server1
    - arg:
      - mkdir /srv

file2.sls:

formula1:
  cmd.cmd.run:
    - tgt: server1
    - arg:
      - cp /etc/passwd /srv

Basically, mkdir /srv never gets executed. I believe the reactor formulas should live in their own namespace, just like state formulas do in separate files.

Both reactors render, but then the formula1 from file2.sls overwrites the formula1 from file1.sls in the reactor space and only this get executed.

basepi commented 10 years ago

Yes, this is expected behavior, purely because they all get loaded into the same dictionary. However, namespacing like we use in states would be very useful. Thanks for the request!

stale[bot] commented 7 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.