Created
August 15, 2018 10:45
-
-
Save gmambro/dec450a0beffb95ca7373066b734e945 to your computer and use it in GitHub Desktop.
Ansible Aerospike facts via asinfo
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
--- | |
- 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