Skip to content

Instantly share code, notes, and snippets.

@gmambro
Created August 15, 2018 10:45
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 gmambro/dec450a0beffb95ca7373066b734e945 to your computer and use it in GitHub Desktop.
Save gmambro/dec450a0beffb95ca7373066b734e945 to your computer and use it in GitHub Desktop.
Ansible Aerospike facts via asinfo
---
- hosts: localhost
tasks:
- name: Run asinfo
shell: asinfo -l -v stats
register: asinfo_output
- set_fact:
aero_stats: "{{ aero_stats|default({})|combine( { item.split('=')[0] : item.split('=', 1)[1] } ) }}"
with_items: "{{ asinfo_output.stdout_lines }}"
- debug:
var: aero_stats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment