Cannot extend ID. It is not part of highstate

I spent quite a while scratching my head over the following error message from Salt:

Cannot extend ID trafficserver in "base:trafficserver.collector". It is not part of the high state.

This actually means that you used a requisite clause like watch_in to inject a dependency into a state that Salt cannot resolve. I filed bug 7336.

Read more...

Creating multiple resources with Salt

I wanted to create a Salt Stack state that manages multiple directories. I figured that there was a way to do this, but could not see a good example in the documentation. Fortunately, the very helpful #salt IRC channel pointed me to the answer:

hierarchy:
   file.directory:
     - user: root
     - group: root
     - mode: 755
     - makedirs: True
     - names:
      - /var/lib/hierarchy
      - /var/lib/hierarchy/a
      - /var/lib/hierarchy/b
      - /var/lib/hierarchy/b/c
      - /var/lib/hierarchy/b/c/d
Read more...