Use force OPTIONS to install the jq

when the force is yes, get_url moudel will download the file
every time and replace the file if the contents change, so it's
not necessary to remove the jq before get it.

Change-Id: I7337afecd1f9d7c66da46bff433016a39fd9ef7a
This commit is contained in:
jacky06 2020-03-28 22:39:30 +08:00 committed by Chris Wedgwood
parent 0e6314ff14
commit 655f0f4db5

@ -22,15 +22,7 @@
- jq
rpm:
- jq
- name: removing jq binary on centos
become: true
become_user: root
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
file:
path: "{{ item }}"
state: absent
with_items:
- /usr/bin/jq
- name: installing jq 1.5 binary for centos
become: true
become_user: root
@ -39,3 +31,4 @@
url: https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
dest: /usr/bin/jq
mode: 0555
force: yes