No matching sls found for 'apache' in env 'base'

10,920 views
Skip to first unread message

Vinomaster

unread,
Jun 12, 2013, 4:01:50 PM6/12/13
to salt-...@googlegroups.com
Salt Master: Ubuntu 10.4
Salt Minion: Ubuntu 10.4
salt 0.15.3

I am a Salt-newbie evaluating the technology as an alternative to Chef, Puppet, Bosh for config mgmt tasks with OpenStack IaaS. 

When trying basic tutorial examples outlined here I get the following issue:

root@salt-master:~/srv/salt# salt '*' state.sls apache
minion-1:
    Data failed to compile:
----------
    No matching sls found for 'apache' in env 'base'

Where my SLS contains a basic init.sls

root@salt-master:~/srv/salt# ls -l apache
-rw-r--r-- 1 root root 511 2013-06-12 19:11 init.sls

Did I miss something in the tutorials? 

My /etc/salt/master config sets the base environment as:

file_roots:
  base:
    - /srv/salt

Ben Hosmer

unread,
Jun 12, 2013, 4:06:21 PM6/12/13
to salt-...@googlegroups.com
Is there an apache.sls location in /srv/salt/ ?


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Ben Hosmer

Brevard Tech - Brevard County Florida's Tech User Group

Vinomaster

unread,
Jun 12, 2013, 4:26:01 PM6/12/13
to salt-...@googlegroups.com
No. Just ~/srv/salt/apache/init.sls

Colton Myers

unread,
Jun 12, 2013, 4:26:47 PM6/12/13
to salt-...@googlegroups.com
Your configuration looks to be correct.  Just to check, can you put the contents of that init.sls in a new file:  /srv/salt/apache.sls ?  It's possible there's an issue with the apache/init.sls method when running from the state.sls function.

--
Colton Myers

Vinomaster

unread,
Jun 12, 2013, 4:42:01 PM6/12/13
to salt-...@googlegroups.com
I did the following:

root@salt-master:~/srv/salt# cp apache/init.sls apache.sls
root@salt-master:~/srv/salt# mv apache/ httpd/
root@salt-master:~/srv/salt# ls -l
-rw-r--r-- 1 root root  511 2013-06-12 20:37 apache.sls
drwxr-xr-x 2 root root 4096 2013-06-12 19:11 httpd
root@salt-master:~/srv/salt# salt '*' apache.sls
minion-01:
    "apache.sls" is not available.

Ben Hosmer

unread,
Jun 12, 2013, 4:49:09 PM6/12/13
to salt-...@googlegroups.com
Can you post your master configuration?


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Message has been deleted
Message has been deleted

Vinomaster

unread,
Jun 12, 2013, 5:14:06 PM6/12/13
to salt-...@googlegroups.com
Looks like any attachments are deleted in this google-group. Sorry, but my only changes are to the following values:
interface: 10.0.x.x (masked)
publish_port: 4505
ret_port: 4506
file_roots:
  base:
    - /srv/salt

Tim Messier

unread,
Jun 12, 2013, 5:45:13 PM6/12/13
to salt-...@googlegroups.com

I think you still need a top.sls for the state.sls command to work

David Boucha

unread,
Jun 12, 2013, 7:10:55 PM6/12/13
to salt users list
A top.sls is not required if you use state.sls
Dave Boucha  |  Sr. Engineer


5272 South College Drive, Suite 301 | Murray, UT 84123

office 801-305-3563
da...@saltstack.com | www.saltstack.com

David Boucha

unread,
Jun 12, 2013, 7:13:58 PM6/12/13
to salt users list
On Wed, Jun 12, 2013 at 2:26 PM, Vinomaster <dmsp...@gmail.com> wrote:
No. Just ~/srv/salt/apache/init.sls


that should be    /srv/salt/apache/init.sls   not  ~/srv/salt/apache/init.sls



--

Vinomaster

unread,
Jun 13, 2013, 9:19:34 AM6/13/13
to salt-...@googlegroups.com
Thanks Dave That worked. Now onto next error :-(


On Wednesday, June 12, 2013 4:01:50 PM UTC-4, Vinomaster wrote:

Ben Hosmer

unread,
Jun 14, 2013, 3:39:19 AM6/14/13
to salt-...@googlegroups.com
I'm wracking my brain to try and figure out what might be wrong that this state file can't be found. It seems you are doing everything right here.

Can you turn on more verbose logging and maybe use salt-call to see what might be going on?

salt-call state.als apache --log-level=debug


On Wed, Jun 12, 2013 at 5:06 PM, Vinomaster <dmsp...@gmail.com> wrote:
Attached is a snapshot of my /etc/salt/master file with my IP masked....I only changed 1 or 2 values in the default.


On Wednesday, June 12, 2013 4:01:50 PM UTC-4, Vinomaster wrote:
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

benit...@gmail.com

unread,
Jul 7, 2017, 8:48:41 AM7/7/17
to Salt-users
Hello

Juan Medina

unread,
Jan 22, 2018, 3:49:13 PM1/22/18
to Salt-users
To the orignal post ... this is what you needed.

salt '*' state.sls apache.apache  
Reply all
Reply to author
Forward
0 new messages