Skip to content

Commit 0e66083

Browse files
Use toml instead
1 parent a492c8b commit 0e66083

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

etc/kayobe/ansible/push-ofed.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,32 @@
2020
paths: "/home/stack/ofed"
2121
register: rpm_dir
2222

23+
- name: Ensure Pulp configuration directory exists
24+
ansible.builtin.file:
25+
path: /home/stack/.config/pulp/
26+
state: directory
27+
recurse: true
28+
29+
- name: Setup Pulp credentials
30+
ansible.builtin.blockinfile:
31+
path: /home/stack/.config/pulp/cli.toml
32+
create: true
33+
block: |
34+
[cli]
35+
base_url = '{{ stackhpc_release_pulp_url }}'
36+
verify_ssl = true
37+
format = "json"
38+
username = '{{ stackhpc_release_pulp_username }}'
39+
password = '{{ stackhpc_release_pulp_password }}'
40+
no_log: true
41+
2342
- name: Upload OFED RPMs to Pulp
2443
ansible.builtin.shell:
2544
cmd: |
2645
pulp \
27-
--base-url '{{ stackhpc_release_pulp_url }}' \
28-
--username '{{ stackhpc_release_pulp_username }}' \
29-
--password '{{ stackhpc_release_pulp_password }}' \
3046
rpm content \
3147
--type package upload \
3248
--repository '{{ stackhpc_pulp_repo_doca_ofed_rhel9.name }}' \
3349
--file {{ item.path }} \
3450
with_items: "{{ rpm_dir.files }}"
35-
no_log: true
36-
register: upload_debug
3751
failed_when: false
38-
39-
- name: Write stdout to file
40-
copy:
41-
content: "{{ upload_debug.stdout }}"
42-
dest: "/home/stack/upload-debug"
43-
44-
- name: Write stderr to file
45-
copy:
46-
content: "{{ upload_debug.stderr }}"
47-
dest: "/home/stack/upload-error"

0 commit comments

Comments
 (0)