I have a sls script which was written by a college. The next state always requires the previous state.
Example:
apache:
service.running:
- name: apache2
- enable: True
...
apache_modules:
apache_module.enabled:
...
- require:
- pkg: apache
server.conf:
file.managed:
- name: /etc/apache2/sites-available/server.conf
...
- require:
- pkg: apache
apache_sites_enabled:
apache_site.enabled:
- names:
- server
- require:
- file: server.conf
Question: Is this "require" needed?
I guess it is not needed, since salt executes one state after the other.
I care for readabilty and would like to keep the file as small as possible.