I'm attempting to have a state depend on another state (state 'chaining' as outlined here)
In my example I have an include for the 'php' formula.
On line 14 of init.sls
you can see - sls: php
which is supposed to ensure that state install-pear
depends on the php
state which is derived from php.init.sls (included below for clarity).
When I execute salt foo state.highstate test=True
I receive the following:
foo:
----------
ID: php
Function: pkg.installed
Name: php5
Result: None
Comment: The following packages are set to be installed/updated: php5.
Started: 23:29:15.906874
Duration: 217.042 ms
Changes:
----------
ID: install-pear
Function: cmd.run
Name: pear uninstall db
pear install db-1.7.14
Result: False
Comment: The following requisites were not found:
require:
sls: php
Started:
Duration:
Changes:
Summary
------------
Succeeded: 1 (unchanged=1)
Failed: 1
------------
Total states run: 2
The interesting thing is when I change the require to 'pkg: php' it works as I would expect:
foo:
----------
ID: php
Function: pkg.installed
Name: php5
Result: None
Comment: The following packages are set to be installed/updated: php5.
Started: 23:26:47.362944
Duration: 221.51 ms
Changes:
----------
ID: install-pear
Function: cmd.run
Name: pear uninstall db
pear install db-1.7.14
Result: None
Comment: Command "pear uninstall db
pear install db-1.7.14
" would have been executed
Started: 23:26:47.584597
Duration: 5.816 ms
Changes:
Summary
------------
Succeeded: 2 (unchanged=2)
Failed: 0
------------
Total states run: 2
This is a trivialised example, I don't actually want to have a requirement for 'php', I'm actually attempting to chain states in a formula for freepbx I'm working on.