Skip to content

Commit 7b6ce49

Browse files
committed
Fix Ansible Lint issues
Signed-off-by: Oliver Kautz <oliver.kautz@gonicus.de>
1 parent 4c2073a commit 7b6ce49

2 files changed

Lines changed: 43 additions & 26 deletions

File tree

playbooks/create_chore_branches.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,28 @@
88
environment:
99
PATH: "{{ install_dir }}:{{ ansible_env.PATH }}"
1010
tasks:
11-
- name: "Install Just"
12-
ansible.builtin.command:
13-
cmd: "curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to {{ ansible_user_dir }}/.local/bin/"
14-
creates: "{{ ansible_user_dir }}/.local/bin/just"
11+
- name: Install just
12+
ansible.builtin.unarchive:
13+
src: "https://github.com/casey/just/releases/download/{{ just_version }}/just-{{ just_version }}-x86_64-unknown-linux-musl.tar.gz"
14+
dest: "{{ install_dir }}"
15+
extra_opts: "--strip-components=1"
16+
mode: "+x"
17+
remote_src: true
18+
args:
19+
creates: "{{ install_dir }}/just"
1520
- name: "Ensure just env file"
1621
ansible.builtin.copy:
17-
src: "{{ zuul.project.src_dir}}/just.env.example"
18-
dest: "{{ zuul.project.src_dir}}/just.env"
22+
src: "just.env.example"
23+
dest: "just.env"
24+
mode: preserve
1925
- name: "Set Enviroments variables for just"
2026
ansible.builtin.lineinfile:
21-
path: "{{ zuul.project.src_dir}}/just.env"
27+
path: "just.env"
2228
regexp: '^GH_TOKEN='
2329
line: "GH_TOKEN={{ github_token }}"
2430
- name: "Build Versions"
25-
ansible.builtin.command: "just --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile build-versions"
31+
ansible.builtin.command: "just build-versions"
32+
changed_when: false
2633
- name: "Create Chore PRs"
27-
ansible.builtin.command: "just --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile git-chore-branches-all"
34+
ansible.builtin.command: "just git-chore-branches-all"
35+
changed_when: false

playbooks/upload_assets.yaml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
- name: "Upload Assets"
3-
hosts: "all"
2+
- name: Upload Assets
3+
hosts: all
44
vars:
5+
just_version: "1.37.0"
56
install_dir: "{{ ansible_user_dir }}/.local/bin"
67
is_pr: true # Set to False for Runs after merge.
78
registry_credentials:
@@ -12,25 +13,33 @@
1213
environment:
1314
PATH: "{{ install_dir }}:{{ ansible_env.PATH }}"
1415
tasks:
15-
- name: "Install Just"
16-
ansible.builtin.command:
17-
cmd: "curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to {{ ansible_user_dir }}/.local/bin/"
18-
creates: "{{ ansible_user_dir }}/.local/bin/just"
19-
- name: "Ensure just env file"
16+
- name: Install just
17+
ansible.builtin.unarchive:
18+
src: "https://github.com/casey/just/releases/download/{{ just_version }}/just-{{ just_version }}-x86_64-unknown-linux-musl.tar.gz"
19+
dest: "{{ install_dir }}"
20+
extra_opts: "--strip-components=1"
21+
mode: "+x"
22+
remote_src: true
23+
args:
24+
creates: "{{ install_dir }}/just"
25+
- name: Ensure just env file
2026
ansible.builtin.copy:
21-
src: "{{ zuul.project.src_dir}}/just.env.example"
22-
dest: "{{ zuul.project.src_dir}}/just.env"
23-
- name: "Set Enviroments variables for just"
27+
src: "just.env.example"
28+
dest: "just.env"
29+
mode: preserve
30+
- name: Set Enviroments variables for just
2431
ansible.builtin.lineinfile:
25-
path: "{{ zuul.project.src_dir}}/just.env"
26-
regexp: '^{{ item.key }}='
32+
path: "just.env"
33+
regexp: "^{{ item.key }}="
2734
line: "{{ item.key }}={{ item.value }}"
28-
loop: "{{registry_credentials | dict2items }}"
29-
- name: "Upload Preliminary Assets"
35+
loop: "{{ registry_credentials | dict2items }}"
36+
- name: Upload Preliminary Assets
3037
ansible.builtin.command:
31-
cmd: "just --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile publish-test-release"
38+
cmd: "just publish-test-release"
3239
when: is_pr
33-
- name: "Upload Release Assets"
40+
changed_when: false
41+
- name: Upload Release Assets
3442
ansible.builtin.command:
35-
cmd: "just --yes --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile publish-release"
43+
cmd: "just --yes publish-release"
3644
when: not is_pr
45+
changed_when: false

0 commit comments

Comments
 (0)