Skip to content

Commit

Permalink
Merge pull request #20 from DE-mbecker/master
Browse files Browse the repository at this point in the history
Fixing filter success
  • Loading branch information
MiLk authored Nov 7, 2019
2 parents c0ac697 + 1dd682f commit 333bc78
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@
register: __disk_config
when: disk_discover_aws_nvme_ebs | default(True) | bool

- set_fact:
disk_additional_disks: "{{ __disk_config['ansible_facts']['config'] }}"
when: __disk_config is defined and __disk_config | success and 'ansible_facts' in __disk_config
- name: setting fact if ansible version is 2.5 or older
block:
- set_fact:
disk_additional_disks: "{{ __disk_config['ansible_facts']['config'] }}"
when: __disk_config is defined and __disk_config | success and 'ansible_facts' in __disk_config
when: ansible_version.full is version('2.5.0', '<')

- name: setting fact if ansible version is newer than 2.5
block:
- set_fact:
disk_additional_disks: "{{ __disk_config['ansible_facts']['config'] }}"
when: __disk_config is defined and __disk_config is not successful and 'ansible_facts' in __disk_config
when: ansible_version.full is version('2.5.0', '>=')

- name: "Install parted"
package:
Expand Down

0 comments on commit 333bc78

Please sign in to comment.