Last active
May 21, 2018 15:47
-
-
Save vpnwall-services/416b3be06788d27e1b16729349c36db6 to your computer and use it in GitHub Desktop.
[Push Reactor with Pillar data] Execute a event with data inside #linux #orchestration #saltstack #pillar #reactor #jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Push new dynamic public ip address | |
# to a dyndns server | |
salt-call event.send 'vpnwall/custom/event/updatedyndns' \ | |
"{domainname: $(cat /etc/hostname), newip: $(https://icanhazip.com)}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update dyndns record on dyndns server: | |
local.state.sls: | |
- tgt: 'dyndns.server.local' | |
- arg: | |
- states.common.updatedyndns | |
- kwarg: | |
queue: True | |
pillar: | |
event_tag: {{ tag }} | |
event_data: {{ data }} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment