Skip to content

Instantly share code, notes, and snippets.

@vpnwall-services
Last active May 21, 2018 15:47
Show Gist options
  • Save vpnwall-services/416b3be06788d27e1b16729349c36db6 to your computer and use it in GitHub Desktop.
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
#!/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)}"
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