Skip to content

Instantly share code, notes, and snippets.

Created July 15, 2015 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5595b9e3f17dd871e9c3 to your computer and use it in GitHub Desktop.
Save anonymous/5595b9e3f17dd871e9c3 to your computer and use it in GitHub Desktop.
[ash1] root@v-salt-001-prod:/srv/kubernetes-saltstack# salt 'b-kubernet-r16e14*' state.highstate
b-kubernet-r16e14:
----------
ID: states
Function: no.None
Result: False
Comment: Unable to render top file: Jinja variable 'dict object' has no attribute 'hostname'
Started:
Duration:
Changes:
Summary
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
[ash1] root@v-salt-001-prod:/srv/kubernetes-saltstack# salt 'b-kubernet-r16e14*' pillar.items
b-kubernet-r16e14:
----------
kube_nodes:
----------
kubmasta:
----------
ipaddress:
10.119.150.81
portal_net:
10.100.0.0/16
type:
master
kubminion1:
----------
ipaddress:
10.119.150.82
type:
minion
kubminion2:
----------
ipaddress:
10.119.150.83
type:
minion
kubminion3:
----------
ipaddress:
10.119.150.84
type:
minion
kubminion4:
----------
ipaddress:
10.119.150.85
type:
minion
kubminion5:
----------
ipaddress:
10.119.150.86
type:
minion
[ash1] root@v-salt-001-prod:/srv/kubernetes-saltstack# cat salt/top.sls
base:
'*':
- baseinstall
{% if 'minion' in salt['pillar.get']('kube_nodes:' ~ grains['hostname'] ~ ':type') %}
- minioninstall
{% elif 'master' in salt['pillar.get']('kube_nodes:' ~ grains['hostname'] ~ ':type') %}
- masterinstall
- pods
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment