Skip to content

Commit

Permalink
lint: add missing become stmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rpelisse committed Oct 19, 2023
1 parent fd38d64 commit 81053a3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions cci_worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- name: "Ensure jaegertracing docker image is downloaded for tests"
containers.podman.podman_image:
name: "quay.io/jaegertracing/all-in-one:latest"
become: yes
become_user: "{{cci_worker_username}}"

tasks:
Expand Down
3 changes: 3 additions & 0 deletions roles/cci_worker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
enabled: yes

- name: Set environment variables
become: yes
become_user: "{{ cci_worker_username }}"
ansible.builtin.template:
src: templates/bashrc_template.j2
Expand All @@ -75,10 +76,12 @@
owner: "{{ cci_worker_username }}"

- name: "Enable Linger for {{ cci_worker_username }}"
become: yes
become_user: "{{ cci_worker_username }}"
ansible.builtin.shell: loginctl enable-linger {{ cci_worker_username }}

- name: Enable podman
become: yes
become_user: "{{ cci_worker_username }}"
ansible.builtin.systemd:
name: "podman.socket"
Expand Down
1 change: 1 addition & 0 deletions roles/payload_status/tasks/deploy_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
state: started
detach: no
command: "./build.sh"
become: yes
become_user: "{{ payload_status.owner }}"

- ansible.builtin.set_fact:
Expand Down
3 changes: 2 additions & 1 deletion roles/payload_status/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- ansible.builtin.stat:
path: "{{ ares.home }}"
register: ares_home

- ansible.builtin.assert:
that:
- ares_home is defined
Expand Down Expand Up @@ -78,6 +78,7 @@
# the next steps depend on outcome of this run - keep container attached until build is done
detach: no
command: "./build.sh"
become: yes
become_user: "{{ payload_status.owner }}"
when:
- git_results.changed or payload_env.changed
Expand Down
6 changes: 4 additions & 2 deletions roles/podman/tasks/images.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- ansible.builtin.assert:
that:
that:
- podman_images_home is defined
quiet: True
fail_msg: "Required parameters podman_images_home is not defined."
Expand All @@ -16,7 +16,7 @@
- podman_images_home_info.stat.exists is defined
- podman_images_home_info.stat.exists
- podman_images_home_info.stat.isdir is defined
- podman_images_home_info.stat.isdir
- podman_images_home_info.stat.isdir
quiet: True
fail_msg: "Invalid podman_images_home_info provided: {{ podman_images_home_info.stat.isdir }}."

Expand All @@ -26,6 +26,7 @@
- name: "Ensure remote images are downloaded"
containers.podman.podman_image:
name: "{{ files.name }}"
become: yes
become_user: "{{ files.owner | default('root') }}"
with_items: "{{ podman.images.remotes }}"
loop_control:
Expand All @@ -36,6 +37,7 @@
name: "{{ files.tag }}"
path: "{{ podman_images_home }}/{{ files.name }}"
state: build
become: yes
become_user: "{{ files.owner | default('root') }}"
with_items: "{{ podman.images.locals }}"
loop_control:
Expand Down

0 comments on commit 81053a3

Please sign in to comment.