Skip to content

Commit 619d463

Browse files
author
Arvind Jangir
committed
don't use /root path
1 parent 24d9ada commit 619d463

5 files changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ jobs:
456456
run: |
457457
./foremanctl deploy-proxy \
458458
--flavor foreman-proxy-content \
459-
--certificate-bundle /root/proxy.example.com.tar.gz \
459+
--certificate-bundle $(pwd)/.var/lib/foremanctl/proxy.example.com.tar.gz \
460460
--foreman-fqdn quadlet.example.com
461461
- name: Run tests
462462
run: |

src/playbooks/prepare-proxy/metadata.obsah.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ variables:
66
hostname:
77
parameter: hostname
88
help: FQDN of the proxy host to prepare.
9-
required: true

src/playbooks/prepare-proxy/prepare-proxy.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
groups: proxy
3232
ansible_connection: ssh
3333
ansible_host: "{{ hostname }}"
34-
ansible_user: "{{ proxy_ssh_user | default('root') }}"
3534
inventory_dir: "{{ inventory_dir }}"
3635

3736
- name: Transfer proxy certificate bundle and oauth credentials to proxy host
@@ -46,23 +45,23 @@
4645
- name: Copy certificate bundle to proxy
4746
ansible.builtin.copy:
4847
src: "{{ obsah_state_path }}/{{ hostname }}.tar.gz"
49-
dest: "/root/{{ hostname }}.tar.gz"
48+
dest: "/tmp/{{ hostname }}.tar.gz"
5049
mode: "0600"
5150
owner: root
5251
group: root
5352

5453
- name: Copy OAuth consumer key to proxy
5554
ansible.builtin.copy:
5655
src: "{{ foreman_oauth_consumer_key_file }}"
57-
dest: "/root/foreman-oauth-consumer-key"
56+
dest: "{{ obsah_state_path }}/foreman-oauth-consumer-key"
5857
mode: "0600"
5958
owner: root
6059
group: root
6160

6261
- name: Copy OAuth consumer secret to proxy
6362
ansible.builtin.copy:
6463
src: "{{ foreman_oauth_consumer_secret_file }}"
65-
dest: "/root/foreman-oauth-consumer-secret"
64+
dest: "{{ obsah_state_path }}/foreman-oauth-consumer-secret"
6665
mode: "0600"
6766
owner: root
6867
group: root

src/roles/certificates/tasks/extract.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
path: "{{ certificates_bundle }}"
55
register: _certificates_tar_file_path
66
delegate_to: localhost
7+
become: false
78

89
- name: Fail if path to certificate tar file does not exist
910
ansible.builtin.fail:

src/roles/pre_install/tasks/foreman-proxy-content.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
- name: Read OAuth consumer key from file
33
ansible.builtin.slurp:
4-
src: /root/foreman-oauth-consumer-key
4+
src: "{{ obsah_state_path }}/foreman-oauth-consumer-key"
55
register: _oauth_key_file
66

77
- name: Set OAuth consumer key
@@ -10,7 +10,7 @@
1010

1111
- name: Read OAuth consumer secret from file
1212
ansible.builtin.slurp:
13-
src: /root/foreman-oauth-consumer-secret
13+
src: "{{ obsah_state_path }}/foreman-oauth-consumer-secret"
1414
register: _oauth_secret_file
1515

1616
- name: Set OAuth consumer secret

0 commit comments

Comments
 (0)