Skip to content

Commit 1ae2030

Browse files
committed
Move ansible_user_dir to group_vars
This commit is one of the steps of replacing common used vars with group_vars to improve overall maintenance of variables in ci-framework Signed-off-by: Amartya Sinha <[email protected]>
1 parent 84c46b6 commit 1ae2030

File tree

65 files changed

+16
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+16
-84
lines changed

hooks/playbooks/ceph.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
tasks:
3131
- name: Set ssh key path facts
3232
ansible.builtin.set_fact:
33-
private_key: "{{ lookup('env', 'HOME') }}/.ssh/{{ cifmw_admin_user }}-id_rsa"
34-
public_key: "{{ lookup('env', 'HOME') }}/.ssh/{{ cifmw_admin_user }}-id_rsa.pub"
33+
private_key: "{{ ansible_user_dir }}/.ssh/{{ cifmw_admin_user }}-id_rsa"
34+
public_key: "{{ ansible_user_dir }}/.ssh/{{ cifmw_admin_user }}-id_rsa.pub"
3535
run_once: true # noqa: run-once[task]
3636

3737
- name: Stat private key
@@ -80,14 +80,14 @@
8080

8181
- name: Get local private key
8282
ansible.builtin.slurp:
83-
src: "{{ lookup('env', 'HOME') }}/.ssh/{{ cifmw_admin_user }}-id_rsa"
83+
src: "{{ ansible_user_dir }}/.ssh/{{ cifmw_admin_user }}-id_rsa"
8484
register: private_key_get
8585
delegate_to: localhost
8686
no_log: true
8787

8888
- name: Get local public key
8989
ansible.builtin.slurp:
90-
src: "{{ lookup('env', 'HOME') }}/.ssh/{{ cifmw_admin_user }}-id_rsa.pub"
90+
src: "{{ ansible_user_dir }}/.ssh/{{ cifmw_admin_user }}-id_rsa.pub"
9191
register: public_key_get
9292
delegate_to: localhost
9393
roles:

reproducer-clean.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
- deepscrub
7373
delegate_to: localhost
7474
ansible.builtin.file:
75-
path: "{{ lookup('env', 'HOME') }}/ci-framework-data/ci-reproducer"
75+
path: "{{ ansible_user_dir }}/ci-framework-data/ci-reproducer"
7676
state: absent
7777

7878
- name: Remove basedir

roles/adoption_osp_deploy/molecule/default/converge.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
cifmw_adoption_osp_deploy_repos: []
1313
cifmw_adoption_source_scenario_path: "."
1414
cifmw_basedir: "{{ playbook_dir }}"
15-
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
1615

1716
tasks:
1817
- name: Gather stack nodes and facts

roles/build_containers/molecule/default/prepare.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
- name: Prepare
1919
hosts: all
2020
vars:
21-
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
2221
cifmw_basedir: "{{ ansible_user_dir }}/ci-framework-data/"
2322
roles:
2423
- role: test_deps

roles/build_containers/molecule/hotfix/prepare.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
- name: Prepare
1919
hosts: all
2020
vars:
21-
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
2221
cifmw_basedir: "{{ ansible_user_dir }}/ci-framework-data/"
2322
roles:
2423
- role: test_deps

roles/build_openstack_packages/molecule/default/converge.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
- name: Converge
1919
hosts: all
2020
vars:
21-
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
2221
cifmw_basedir: "{{ cifmw_project_dir_absolute }}"
2322
cifmw_bop_openstack_release: master
2423
cifmw_bop_dlrn_baseurl: https://trunk.rdoproject.org/centos9-master

roles/build_openstack_packages/molecule/default/prepare.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
- name: Prepare
1919
hosts: all
2020
vars:
21-
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
2221
cifmw_basedir: "{{ cifmw_project_dir_absolute }}"
2322
roles:
2423
- role: test_deps

roles/cert_manager/tasks/validate_certs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
- name: Create $HOME/bin dir
1818
ansible.builtin.file:
19-
path: "{{ lookup('env', 'HOME') }}/bin"
19+
path: "{{ ansible_user_dir }}/bin"
2020
state: directory
2121
mode: '0755'
2222

@@ -30,11 +30,11 @@
3030
_arch: "{{ lookup('pipe', 'go env GOARCH') }}"
3131
ansible.builtin.get_url:
3232
url: "https://github.com/cert-manager/cmctl/releases/{{ cifmw_cert_manager_version }}/download/cmctl_{{ _os }}_{{ _arch }}"
33-
dest: "{{ lookup('env', 'HOME') }}/bin/cmctl"
33+
dest: "{{ ansible_user_dir }}/bin/cmctl"
3434
mode: "0755"
3535

3636
- name: Verify cert_manager api
3737
environment:
3838
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
3939
PATH: "{{ cifmw_path }}"
40-
ansible.builtin.command: "{{ lookup('env', 'HOME') }}/bin/cmctl check api --wait=2m"
40+
ansible.builtin.command: "{{ ansible_user_dir }}/bin/cmctl check api --wait=2m"

roles/ci_gen_kustomize_values/molecule/default/prepare.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
vars:
2121
cifmw_ci_gen_kustomize_values_src_dir: >-
2222
{{
23-
(lookup('env', 'HOME'),
23+
(ansible_user_dir,
2424
'ci-framework-data',
2525
'artifacts', 'ci_k8s_snippets') | path_join
2626
}}
@@ -46,7 +46,4 @@
4646
type: "ecdsa"
4747

4848
- name: Download tools for later testing and validations
49-
ansible.builtin.import_playbook: >-
50-
{{ (lookup('env', 'HOME'),
51-
'src/github.com/openstack-k8s-operators',
52-
'install_yamls/devsetup/download_tools.yaml') | path_join }}
49+
ansible.builtin.import_playbook: "{{ cifmw_installyamls_repos }}/devsetup/download_tools.yaml"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
---
2-
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
32
openstack_namespace: openstack

0 commit comments

Comments
 (0)