Skip to content

Instantly share code, notes, and snippets.

@thatch45
Created February 27, 2012 17:38
Show Gist options
  • Select an option

  • Save thatch45/1925788 to your computer and use it in GitHub Desktop.

Select an option

Save thatch45/1925788 to your computer and use it in GitHub Desktop.
emacs:
pkg:
- installed
{% if grains['osrelease'].startswith('5') %}
- name: emacsBROKEN
{% endif %}
@undeadops

Copy link
Copy Markdown

In my top.sls I have:

'os:CentOS':
- match: grain
- apps.yum-plugins

@undeadops

Copy link
Copy Markdown

in my apps/yum-plugins.sls file i have:

yum-plugin-priorities:
pkg:
{% if grains['osrelease'].startswith(5) %}
- name: yum-priorities
{% endif %}
- installed

@undeadops

Copy link
Copy Markdown

with proper spacing...

@thatch45

Copy link
Copy Markdown
Author

the 5 is being evaluated as an int, put some quotes around it

@undeadops

Copy link
Copy Markdown

found that... changed it...

[root@neon ~]# salt-call state.highstate
[INFO ] Loading fresh modules for state activity
[INFO ] Loading fresh modules for state activity
Error running 'state.highstate': argument of type 'NoneType' is not iterable

@thatch45

Copy link
Copy Markdown
Author

ouch, what version is this? you probably found an error checking bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment