Skip to content

Instantly share code, notes, and snippets.

@bvcelari
Last active May 8, 2017 15:14
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 bvcelari/730a9b3b9c27c072c2af034dd66bb7e2 to your computer and use it in GitHub Desktop.
Save bvcelari/730a9b3b9c27c072c2af034dd66bb7e2 to your computer and use it in GitHub Desktop.
$ root@ip-LALALALALA:/salt# salt '*' mine.update network.ip_addrs
minion-1:
True
minion-2:
True
------------------------
$ root@ip-LALALALALA:/salt# salt '*' pillar.get network.ip_addrs
minion-1:
minion-2:
------------------------
$ root@ip-LALALALALA:/# tail pillar/top.sls
'G@ec2_tags:Roles:aws':
- match: compound
- things.thatworks
- mine.network.10_network_addrs
------------------------
$ root@ip-LALALALALA:/# cat pillar/mine/network/10_network_addrs.sls
mine_functions:
10_network_addrs:
mine_function: network.ip_addrs
------------------------
$ root@ip-LALALALALA:/salt# salt '*' grains.get ipv4
minion-1:
- 10.182.1.121
- 127.0.0.1
minion-2:
- 10.182.1.133
- 127.0.0.1
------------------
$ root@ip-LALALALALA:/salt# salt '*' pillar.get mine_functions
minion-1:
----------
10_network_addrs:
----------
mine_function:
network.ip_addrs
minion-2:
----------
10_network_addrs:
----------
mine_function:
network.ip_addrs
------------------
$ root@ip-LALALALALA:/salt# salt '*' mine.get network.ip_addrs
minion-1:
----------
minion-2:
----------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment