Skip to content
This repository has been archived by the owner on Jul 7, 2020. It is now read-only.

Commit

Permalink
vagrant/ansible: do not use filter, but "is"
Browse files Browse the repository at this point in the history
Ansible complains that checking the return value of a filter action is
deprecated. It seems required to use "is" instead of the pipe ("|").

    [DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using
    `result|version_compare` use `result is version_compare`. This feature will be
    removed in version 2.9. Deprecation warnings can be disabled by setting
    deprecation_warnings=False in ansible.cfg.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
  • Loading branch information
nixpanic committed Jan 16, 2019
1 parent 932646e commit 754662a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions vagrant/gcr_proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- include_role:
name: master
tasks_from: gcr_proxy.yml
when: custom_registry_gcr | default(false)
when: custom_registry_gcr is default(false)

- hosts: nodes
become: yes
Expand All @@ -18,4 +18,4 @@
- include_role:
name: nodes
tasks_from: gcr_proxy.yml
when: custom_registry_gcr | default(false)
when: custom_registry_gcr is default(false)
4 changes: 2 additions & 2 deletions vagrant/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@

- name: install fixed kubelet-kubeadm config file (1.8 and later)
copy: src=10-kubeadm-post-1.8.conf dest=/etc/systemd/system/kubelet.service.d/10-kubeadm.conf owner=root group=root mode=644 backup=yes
when: kube_ver.stdout | version_compare('1.8', '>=')
when: kube_ver.stdout is version_compare('1.8', '>=')

- name: install fixed kubelet-kubeadm config file
copy: src=10-kubeadm.conf dest=/etc/systemd/system/kubelet.service.d/ owner=root group=root mode=644 backup=yes
when: kube_ver.stdout | version_compare('1.8', '<')
when: kube_ver.stdout is version_compare('1.8', '<')

- name: copy docker conf
template: src=docker.j2 dest=/etc/sysconfig/docker force=yes mode=0644
Expand Down

0 comments on commit 754662a

Please sign in to comment.