Skip to content

Commit f2cbcea

Browse files
fix: use yq from mikefarah
1 parent c035b70 commit f2cbcea

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

roles/terraform/cluster/tasks/main.yaml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@
115115
- curl
116116
- wget
117117
- jq
118-
- yq
119118
- bash-completion
120119
- unzip
121120
- software-properties-common
@@ -298,7 +297,45 @@
298297
state: link
299298
become: true
300299
delegate_to: "{{ bastion_ip.stdout }}"
300+
301+
- name: Create yq directory
302+
ansible.builtin.file:
303+
path: /opt/yq
304+
state: directory
305+
become: true
306+
delegate_to: "{{ bastion_ip.stdout }}"
307+
308+
- name: Download yq from makefarah github
309+
ansible.builtin.uri:
310+
url: https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
311+
dest: /opt/yq/yq
312+
follow_redirects: safe
313+
become: true
314+
delegate_to: "{{ bastion_ip.stdout }}"
301315

316+
- name: Change yq file permission
317+
ansible.builtin.file:
318+
path: /opt/yq/yq
319+
mode: '0775'
320+
become: true
321+
delegate_to: "{{ bastion_ip.stdout }}"
322+
323+
- name: Create a symlink to yq
324+
ansible.builtin.file:
325+
src: "/opt/yq/yq"
326+
dest: "/usr/local/bin/yq"
327+
state: link
328+
become: true
329+
delegate_to: "{{ bastion_ip.stdout }}"
330+
331+
- name: Create a symlink to yq
332+
ansible.builtin.file:
333+
src: "/opt/yq/yq"
334+
dest: "/usr/bin/yq"
335+
state: link
336+
become: true
337+
delegate_to: "{{ bastion_ip.stdout }}"
338+
302339
- name: Clean install scripts
303340
ansible.builtin.file:
304341
path: "{{ item }}"

0 commit comments

Comments
 (0)