Skip to content

Instantly share code, notes, and snippets.

@jalons
Created July 16, 2014 14:24
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 jalons/c00400a057588ba5397a to your computer and use it in GitHub Desktop.
Save jalons/c00400a057588ba5397a to your computer and use it in GitHub Desktop.
Salt grains.setval doesn't allow the use of the character 'h'
# grains.setval hates the letter h. If an h is specified, salt will only use it.
# Setting the grain in /etc/salt/grains on the minion and restarting the minion does allow the 'h' to be specified and used
$ salt minion.domain.tld grains.setval application [foo,bar]
minion.domain.tld:
application:
foo
bar
$ salt minion.domain.tld grains.setval application [Sentinel,Saltdashboard]
minion.domain.tld:
application: h
$ salt minion.domain.tld grains.setval application [Sentinel,saltboard]
minion.domain.tld:
application:
Sentinel
saltboard
$ salt minion.domain.tld grains.setval application [Sentinel,saltdashboard]
minion.domain.tld:
application: h
$ salt minion.domain.tld grains.setval application [Sentinel,saltdasboard]
minion.domain.tld:
application:
Sentinel
saltdasboard
2014-07-16 09:18:16,384 [salt.minion ][INFO ] User jeremy.alons Executing command grains.setval with jid 20140716091816360040
2014-07-16 09:18:16,386 [salt.minion ][DEBUG ] Command details {'tgt_type': 'glob', 'jid': '20140716091816360040', 'tgt': 'minion.domain.tld', 'ret': 'mongo', 'user': 'jeremy.alons', 'arg': ['application', 'h'], 'fun': 'grains.setval'}
2014-07-16 09:18:25,524 [salt.minion ][INFO ] User jeremy.alons Executing command grains.setval with jid 20140716091825502754
2014-07-16 09:18:25,526 [salt.minion ][DEBUG ] Command details {'tgt_type': 'glob', 'jid': '20140716091825502754', 'tgt': 'minion.domain.tld', 'ret': 'mongo', 'user': 'jeremy.alons', 'arg': ['application', '[Sentinel,saltdasboard]'], 'fun': 'grains.setval'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment