]> arthur.barton.de Git - AnsibleRoles.git/commitdiff
Use integer comparision when dealing with "ansible_distribution_major_version"
authorAlexander Barton <alexander.barton@thomas-daily.de>
Mon, 18 Mar 2019 17:59:33 +0000 (18:59 +0100)
committerAlexander Barton <alexander.barton@thomas-daily.de>
Mon, 18 Mar 2019 17:59:33 +0000 (18:59 +0100)
roles/check-mk-agent/meta/main.yml
roles/check-mk-agent/tasks/main.yml
roles/nfs-client/defaults/main.yml
roles/nfs-client/handlers/main.yml
roles/nfs-client/tasks/main.yml
roles/os-base/handlers/main.yml

index 3d3b0eb225991a25027d58e39321b8eaa1b67e29..d08cb30d01e2e3564592ecb1e881624182102981 100644 (file)
@@ -3,4 +3,4 @@
 
 dependencies:
   - { role: os-base }
-  - { role: xinetd, when: "ansible_distribution_major_version < '8'" }
+  - { role: xinetd, when: "ansible_distribution_major_version|int < 8" }
index 90fa5afff0e4d2aaf088036e1e0b04abcba41675..1221c4400defe2570aea348911bc2e2462781e7c 100644 (file)
@@ -21,7 +21,7 @@
   apt: >
     state=present
     name=check-mk-agent-logwatch
-  when: "ansible_distribution_major_version|int >= 7 and ansible_distribution_major_version < '9'"
+  when: "ansible_distribution_major_version|int >= 7 and ansible_distribution_major_version|int < 9"
 
 - name: test for systemd unit files
   tags:
index a043a0527429ce1a52193fa108324e073abfdf13..1381418d2ef3b2d6a746e67eb27f0f343e3fdfdf 100644 (file)
@@ -3,4 +3,4 @@
 
 nfs_client_domain: "{{ ansible_domain }}"
 
-rpc_pipefs: "{{ '/var/lib/nfs/rpc_pipefs' if ansible_distribution_major_version < '8' else '/run/rpc_pipefs' }}"
+rpc_pipefs: "{{ '/var/lib/nfs/rpc_pipefs' if ansible_distribution_major_version|int < 8 else '/run/rpc_pipefs' }}"
index 2e1845d8c7f59ebbd0ff7bef704965d34078801b..3513fc5fb30b5b89d56c6978d8264232c2da26b9 100644 (file)
@@ -5,4 +5,4 @@
   service: >
     name=nfs-common
     state=restarted
-  when: "ansible_distribution_major_version < '8'"
+  when: "ansible_distribution_major_version|int < 8"
index c8bf548eec3260b3edeb12c42d20c80deacf3baf..320c683f73f9d96e70008c2404397e39f6806ff7 100644 (file)
@@ -29,4 +29,4 @@
     enabled=yes
     name=nfs-common
     state=started
-  when: "ansible_distribution_major_version < '8'"
+  when: "ansible_distribution_major_version|int < 8"
index 6b0364dfec2e9e9bd7b58963483c8f9d5ffa4788..657403f38d11b61e16289499e254d90cc389ea42 100644 (file)
@@ -7,4 +7,4 @@
     - systemd
   systemd: >
     daemon_reload=yes
-  when: "ansible_distribution == 'Debian' and ansible_distribution_major_version|int >= '8'"
+  when: "ansible_distribution == 'Debian' and ansible_distribution_major_version|int >= 8"