Skip to content

Commit

Permalink
Fixing check for ansible version
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Becker committed Nov 7, 2019
1 parent f5aac61 commit 1dd682f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
- 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', '<=')
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', '>')
when: ansible_version.full is version('2.5.0', '>=')

- name: "Install parted"
package:
Expand Down

0 comments on commit 1dd682f

Please sign in to comment.