|
8 | 8 | ansible.builtin.pip:
|
9 | 9 | name: pulp-cli
|
10 | 10 |
|
11 |
| - - name: Generate timestamp for distribution |
12 |
| - ansible.builtin.set_fact: |
13 |
| - stackhpc_doca_ofed_repo_version: "{{ '%Y%m%dT%H%M%S' | strftime }}" |
| 11 | + - name: Ensure Pulp configuration directory exists |
| 12 | + ansible.builtin.file: |
| 13 | + path: /home/stack/.config/pulp/ |
| 14 | + state: directory |
| 15 | + recurse: true |
| 16 | + |
| 17 | + - name: Setup Pulp credentials |
| 18 | + ansible.builtin.blockinfile: |
| 19 | + path: /home/stack/.config/pulp/cli.toml |
| 20 | + create: true |
| 21 | + block: | |
| 22 | + [cli] |
| 23 | + base_url = '{{ stackhpc_release_pulp_url }}' |
| 24 | + verify_ssl = true |
| 25 | + format = "json" |
| 26 | + username = '{{ stackhpc_release_pulp_username }}' |
| 27 | + password = '{{ stackhpc_release_pulp_password }}' |
| 28 | + no_log: true |
14 | 29 |
|
15 | 30 | - name: Create Pulp repository for OFED
|
16 | 31 | pulp.squeezer.rpm_repository:
|
|
30 | 45 | ansible.builtin.shell:
|
31 | 46 | cmd: |
|
32 | 47 | {{ venv }}/bin/pulp \
|
33 |
| - --base-url '{{ stackhpc_release_pulp_url }}' \ |
34 |
| - --username '{{ stackhpc_release_pulp_username }}' \ |
35 |
| - --password '{{ stackhpc_release_pulp_password }}' \ |
36 | 48 | rpm content \
|
37 | 49 | --type package upload \
|
38 | 50 | --repository '{{ stackhpc_pulp_repo_doca_ofed_rhel9.name }}' \
|
39 | 51 | --file {{ item.path }} \
|
40 | 52 | --no-publish \
|
41 | 53 | with_items: "{{ rpm_dir.files }}"
|
42 |
| - no_log: true |
43 | 54 |
|
44 | 55 | - name: Create Pulp publication for OFED
|
45 | 56 | pulp.squeezer.rpm_publication:
|
|
55 | 66 | pulp_url: "{{ stackhpc_release_pulp_url }}"
|
56 | 67 | username: "{{ stackhpc_release_pulp_username }}"
|
57 | 68 | password: "{{ stackhpc_release_pulp_password }}"
|
58 |
| - name: "{{ stackhpc_pulp_repo_doca_ofed_rhel9.distribution_name }}{{ ofed_tag }}" |
| 69 | + name: "{{ stackhpc_pulp_repo_doca_ofed_rhel9.distribution_name + ofed_tag }}" |
59 | 70 | publication: "{{ publication.publication.pulp_href }}"
|
60 | 71 | content_guard: development
|
61 |
| - base_path: "{{ stackhpc_pulp_repo_doca_ofed_rhel9.base_path }/{{ ofed_tag }}" |
| 72 | + base_path: "{{ stackhpc_pulp_repo_doca_ofed_rhel9.base_path }}/{{ ofed_tag }}" |
62 | 73 | state: present
|
0 commit comments