I built a state file in salt to copy a list of check_mk Nagios scripts down to the remote server. Below is a snip of the state file.
check_mk_defined_checks:
file.recurse:
- name: /usr/lib/check_mk_agent/local
- source: salt://{{ slspath }}/files/cmk_checks
- user: nagios
- group: users
- file_mode: 754
- dir_mode: 755
- require:
- check_mk_agent_installed
The funny thing is, when I run the sls state directly everything works. See below.
salt-call state.sls dev.roles.srvr.system_conf.check_mk
----------
ID: check_mk_defined_checks
Function: file.recurse
Name: /usr/lib/check_mk_agent/local
Result: True
Comment: The directory /usr/lib/check_mk_agent/local is in the correct state
Started: 20:54:29.105625
Duration: 1475.026 ms
Changes:
However, when I run it as apart of a highstate I get the following error.
----------
ID: check_mk_defined_checks
Function: file.recurse
Name: /usr/lib/check_mk_agent/local
Result: False
Comment: Recurse failed: none of the specified sources were found
Started: 20:45:19.369238
Duration: 917.113 ms
Changes:
I have spent way to much time working on this. I can not use the recurse function in any state or I get the same results. It works when you call the state directly but not as apart of a highstate.
Any help anyone can provide would be great.
Thanks,
{{ slspath }}
part?