troubleshooting custom module paths

471 views
Skip to first unread message

Nate Marks

unread,
Apr 13, 2016, 3:05:54 PM4/13/16
to Salt-users
I'm trying to do something like this:
https://github.com/saltstack/salt/issues/18370

But I can't seem to find the right way to make the custom module available.  I'm getting this error:

salt 'ncaresal*' state.apply yum.client test=True   
ncaresalt01.inframax.ncare:
    Data failed to compile:
----------
    Rendering SLS 'base:yum.client' failed: Jinja variable 'salt.utils.templates.AliasedLoader object' has no attribute 'nora.hasDockerRole'


When i do


----
{% set hasDockerRole = salt['nora.hasDockerRole']() %}                         
{% if hasDockerRole %}    

----


I just can't figure out how to check the path that salt *thinks* it should be using to find that module. 

Thanks!

Nate

Nate Marks

unread,
Apr 14, 2016, 5:41:16 AM4/14/16
to Salt-users
I'm getting closer.  I have it in  <file_roots>/_modules and it works when I target the master, but not when I target the minion. 

Thanks in advance for any tips:D

Nate Marks

unread,
Apr 14, 2016, 5:44:08 AM4/14/16
to Salt-users
Ha! Silly!   I didn't target the  other test minion when I did my sync.  I'll call this solved.


On Wednesday, April 13, 2016 at 3:05:54 PM UTC-4, Nate Marks wrote:

Dmitry Golubenko

unread,
Apr 14, 2016, 5:45:40 AM4/14/16
to salt-...@googlegroups.com
В Чтв, 14/04/2016 в 02:41 -0700, Nate Marks пишет:
> I'm getting closer. I have it in <file_roots>/_modules and it works
> when I target the master, but not when I target the minion.
did you saltutil.sync_modules for your minions?

>
>
> Thanks in advance for any tips:D
>
> On Wednesday, April 13, 2016 at 3:05:54 PM UTC-4, Nate Marks wrote:
> I'm trying to do something like this:
> https://github.com/saltstack/salt/issues/18370
>
> But I can't seem to find the right way to make the custom
> module available. I'm getting this error:
>
> salt 'ncaresal*' state.apply yum.client test=True
> ncaresalt01.inframax.ncare:
> Data failed to compile:
> ----------
> Rendering SLS 'base:yum.client' failed: Jinja variable
> 'salt.utils.templates.AliasedLoader object' has no attribute
> 'nora.hasDockerRole'
>
>
> When i do
>
>
> ----
> {% set hasDockerRole = salt['nora.hasDockerRole']()
> %}
> {% if hasDockerRole %}
>
> ----
>
>
> I just can't figure out how to check the path that salt
> *thinks* it should be using to find that module.
>
> Thanks!
>
> Nate
>
> --
> 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/d/optout.



Reply all
Reply to author
Forward
0 new messages