Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions create-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@
name: sushy_emulator
tasks_from: verify.yml

- name: Set permissions on /home/zuul/ci-framework-data on controller-0
- name: Set permissions on ci-framework-data folder on controller-0
ansible.builtin.file:
path: "{{ cifmw_basedir | default('/home/zuul/ci-framework-data') }}"
path: "{{ cifmw_basedir | default(lookup('env', 'HOME')+'/ci-framework-data') }}"
state: directory
recurse: true
owner: "{{ ansible_user_id }}"
Expand Down
6 changes: 3 additions & 3 deletions deploy-edpm-reuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
when: cifmw_cleanup_architecture | default(true) | bool
delegate_to: controller-0
ansible.builtin.command:
cmd: "/home/zuul/cleanup-architecture.sh"
cmd: "$HOME/cleanup-architecture.sh"
Copy link
Contributor

@danpawlik danpawlik Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not {{ ansible_user_dir }}?
Same for others

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this task is delegated, so we should be fine with various host users.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in that case, maybe "{{ lookup('env', 'HOME') }}" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK command would expand env vars, but it's safer bet to move to your suggestion!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems lookup is executed in the ansible control node, so if user differs between delegated host and control host, then we have a problem. I'm mantaining to $HOME


- name: Inherit from parent scenarios if needed
ansible.builtin.include_tasks:
Expand Down Expand Up @@ -114,7 +114,7 @@
poll: 20
delegate_to: controller-0
ansible.builtin.command:
cmd: "/home/zuul/deploy-architecture.sh {{ cifmw_deploy_architecture_args | default('') }}"
cmd: "$HOME/deploy-architecture.sh {{ cifmw_deploy_architecture_args | default('') }}"

- name: Run post deployment if instructed to
when:
Expand All @@ -124,4 +124,4 @@
poll: 20
delegate_to: controller-0
ansible.builtin.command:
cmd: "/home/zuul/post_deployment.sh {{ cifmw_post_deploy_args | default('') }}"
cmd: "$HOME/post_deployment.sh {{ cifmw_post_deploy_args | default('') }}"
2 changes: 1 addition & 1 deletion playbooks/dcn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
- name: Copy found CR files to the manifests folder
ansible.builtin.copy:
src: "{{ item.path }}"
dest: "/home/zuul/ci-framework-data/artifacts/manifests/openstack/cr"
dest: "{{ ansible_user_dir }}/ci-framework-data/artifacts/manifests/openstack/cr"
mode: "0644"
loop: "{{ dcn_crs.files }}"
when: dcn_crs.matched > 0
4 changes: 2 additions & 2 deletions reproducer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
poll: 20
delegate_to: controller-0
ansible.builtin.command:
cmd: "/home/zuul/deploy-architecture.sh {{ cifmw_deploy_architecture_args | default('') }}"
cmd: "$HOME/deploy-architecture.sh {{ cifmw_deploy_architecture_args | default('') }}"

- name: Run post deployment if instructed to
when:
Expand All @@ -113,4 +113,4 @@
poll: 20
delegate_to: controller-0
ansible.builtin.command:
cmd: "/home/zuul/post_deployment.sh {{ cifmw_post_deploy_args | default('') }}"
cmd: "$HOME/post_deployment.sh {{ cifmw_post_deploy_args | default('') }}"