Skip to content

Instantly share code, notes, and snippets.

@ErwanAliasr1
Created November 28, 2016 13:00
Show Gist options
  • Save ErwanAliasr1/15a4a02d7f6ed3a315df2d3772c18e36 to your computer and use it in GitHub Desktop.
Save ErwanAliasr1/15a4a02d7f6ed3a315df2d3772c18e36 to your computer and use it in GitHub Desktop.
---
# Defines deployment design and assigns role to server groups
- hosts: localhost
gather_facts: false
vars:
lookup_disks: "{'storage_disks': {'size': 'gt(800 MB)', 'rotational': '1', 'count' : '*'}}"
tasks:
# If we can't get python2 installed before any module is used we will fail
# so just try what we can to get it installed
- name: gathering facts
setup:
- name: choose disk
choose_disk:
facts: "{{ansible_devices}}"
disks: "{{lookup_disks}}"
- debug: var=devices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment