Skip to content

Instantly share code, notes, and snippets.

@mbruzek
Created August 15, 2018 15:27
Show Gist options
  • Save mbruzek/b0679c7fb95b6ad7cb8629f59da2c2ee to your computer and use it in GitHub Desktop.
Save mbruzek/b0679c7fb95b6ad7cb8629f59da2c2ee to your computer and use it in GitHub Desktop.
---
- name: mbruzek test
hosts: localhost
vars:
glusterfs_nodes:
- cns-1.scale-ci.example.com
- cns-2.scale-ci.example.com
- cns-0.scale-ci.example.com
l_glusterfs_count: "{{ glusterfs_count | default(glusterfs_nodes | count) }}"
tasks:
- name: print node count
debug:
msg: "{{ glusterfs_nodes | select | list | count }}"
- name: print l_glusterfs_count
debug:
msg: "{{ l_glusterfs_count }}"
- name: print comparison
debug:
msg: "{{ glusterfs_nodes | select | list | count | int == l_glusterfs_count | int }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment