Skip to content

Instantly share code, notes, and snippets.

@kelchm
Last active January 3, 2016 22:19
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 kelchm/af7ad6b98365a141ba40 to your computer and use it in GitHub Desktop.
Save kelchm/af7ad6b98365a141ba40 to your computer and use it in GitHub Desktop.
{%- set ip = salt['publish.publish']('S2049*','network.ip_addrs','cidr="10.0.0.0/8"').values() -%}
nagios-testing:
cmd.run:
- name: echo {{ ip }}
----------
State: - cmd
Name: echo [['10.1.49.28']]
Function: run
Result: True
Comment: Command "echo [['10.1.49.28']]" run
Changes: pid: 7291
retcode: 0
stderr:
stdout: [[10.1.49.28]]
@JasonSwindle
Copy link

{%- set ip =  salt['publish.publish']('S2049*','network.ip_addrs','cidr="10.0.0.0/8"').values() -%}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment