|
Gerard Petersen |
at Sep 13, 2014 at 3:50 pm
|
⇧ |
| |
Hi David,
Thanx for you response. Since the amount of nodes is not that big this is
what I figured so far.
# pillar/top.sls
base:
'all-prod':
- match: nodegroup
- servers.defaults
'all-dev':
- match: nodegroup
- servers.defaults-dev
'srvyy.example.nl':
- servers.srvyy
'srvxx.example.nl':
- servers.srvxx
'srvzz.example.nl':
- servers.srvzz
Not wanting to complicate stuf to much, I want to avoid the whole dual
pillar setup with dev and prod. Two simple .sls files would be enough (see
below).
# pillar/servers/defaults.sls
globals:
backupserver_ip: 99.99.99.99
# pillar/servers/defaults-dev.sls
globals:
backupserver_ip: 192.168.2.5
However, I get an error on 'globals': Unable to manage file: Jinja variable
'dict object' has no attribute 'globals'.
While this works as expected looking at the pillar/top.sls.
# pillar/srvyy.sls
node:
description: 14.04.1LTS VM
area: staging
role: webserver
primary_ip: 192.168.2.13
Any suggestions?
Thanx a lot!
On Saturday, September 13, 2014 4:10:21 PM UTC+2, David Boucha wrote:Your top.sls is how you restrict pillar data per minion
On Sep 13, 2014 7:33 AM, "Gerard Petersen" <
[email protected] <javascript:>>
wrote:
Ieck!!!! ... Scary .. one minion was down, started it and the response
was ok. However while down I got duplicate data returned under the same
name. Is that normal??
[email protected]:/etc/salt# salt-run manage.status
down:
- srvxx.example.nl
up:
- srvyy.example.nl
- srvzz.example.nl
[email protected]:/etc/salt# salt-run manage.status
down:
up:
- srvxx.example.nl
- srvyy.example.nl
- srvzz.example.nl
[email protected]:/etc/salt# salt \* saltutil.sync_all
srvxx.example.nl:
----------
grains:
modules:
outputters:
renderers:
returners:
states:
srvzz.example.nl:
----------
grains:
modules:
outputters:
renderers:
returners:
states:
srvyy.example.nl:
----------
grains:
modules:
outputters:
renderers:
returners:
states:
On Saturday, September 13, 2014 3:20:22 PM UTC+2, Gerard Petersen wrote:
Hi All,
I'm maintaining (trying to setup) some specific data per minion in:
# ./pillar/servers/srvxx.sls
area: staging
description: vBox test server
primary_ip: 192.168.2.12
role: mgmtserver
backup_mysql: 'false'
-- snip --
# Pillar top.sls:
base:
'srvyy.example.nl':
- servers.srvyy
'srvxx.example.nl':
- servers.srvxx
I would like to be able to use this in templates: {{
pillar['primary_ip'] }}
I'm testing and sometimes am seeing an IP address from a wrong server
sls file. Anybody any tips, how to set this up so its easy to maintain?
NB: I also have a name clash. srvyy returns twice and I dont see srvxx.
Might be related.
$ salt \* saltutil.sync_all
srvzz.example.nl:
----------
grains:
modules:
outputters:
renderers:
returners:
states:
srvyy.example.nl:
----------
grains:
modules:
outputters:
renderers:
returners:
states:
srvyy.example.nl:
----------
grains:
modules:
outputters:
renderers:
returners:
states:
Thanx.
Kind regards,
Gerard.
--
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
[email protected] <javascript:>.
For more options, visit
https://groups.google.com/d/optout. --
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
[email protected].
For more options, visit
https://groups.google.com/d/optout.