Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #36 from stdevel/feat-release_pinning-35
Browse files Browse the repository at this point in the history
add option to set Uyuni release
  • Loading branch information
stdevel committed Feb 14, 2022
2 parents 87a7ebf + a543ed2 commit 1e03751
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The system needs access to the internet. Also, you will need an openSUSE Leap or
| Variable | Default | Description |
| -------- | ------- | ----------- |
| `uyuni_suma_release` | `4.2` | SUSE Manager release to install (*4.1 or 4.2*) |
| `uyuni_release` | *empty* | Uyuni release to install (*e.g. `2022.01`*) |
| `uyuni_scc_reg_code` | - | [SUSE Customer Center](https://scc.suse.com) registration code (*received after trial registration or purchase*) |
| `uyuni_scc_mail` | - | SUSE Customer Center mail address |
| `uyuni_scc_check_registration` | `true` | Register system if unregistered |
Expand Down Expand Up @@ -103,6 +104,17 @@ Don't forget setting SUSE-related variables when deploying SUSE Manager:
uyuni_scc_mail: bla@foo.bar
```

If you plan to bootstrap older Uyuni versions, set the Uyuni release:

```yaml
---
- hosts: retro.giertz.loc
remote_user: root
roles:
- role: stdevel.uyuni
uyuni_release: '2020.07'
```

Ensure having all available system updates installed **before** running the playbook!

## Common issues
Expand Down
7 changes: 7 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ uyuni_repos:
name: uyuni-server-stable
- url: "https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Patches/openSUSE_Leap_15.3/"
name: uyuni-server-patches

uyuni_repo_gpg:
- "https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/{{ uyuni_release }}/images/repodata/repomd.xml.key"
uyuni_repo_release:
- url: "https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/{{ uyuni_release }}/images/"
name: uyuni-server-stable

uyuni_packages:
- spacewalk-utils
- spacecmd
Expand Down
1 change: 1 addition & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
uyuni_channels:
- {"name": "centos7", "arch": "x86_64"}
- {"name": "centos7-updates", "arch": "x86_64"}
# uyuni_release: '2021.12'
26 changes: 23 additions & 3 deletions tasks/prepare_opensuse_leap.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
---
- name: Add GPG keys
- name: Add release GPG keys
rpm_key:
key: "{{ item }}"
loop: "{{ uyuni_repo_gpg }}"
become: true
when: uyuni_release is defined

- name: Add latest GPG keys
rpm_key:
key: "{{ item }}"
loop: "{{ uyuni_gpg }}"
become: true
when: uyuni_release is undefined

- name: Add release Uyuni repositories
zypper_repository:
repo: "{{ item.url }}"
name: "{{ item.name }}"
loop: "{{ uyuni_repo_release }}"
become: true
when:
- uyuni_use_repo | bool
- uyuni_release is defined

- name: Add Uyuni repositories
- name: Add latest Uyuni repositories
zypper_repository:
repo: "{{ item.url }}"
name: "{{ item.name }}"
loop: "{{ uyuni_repos }}"
become: true
when: uyuni_use_repo | bool
when:
- uyuni_use_repo | bool
- uyuni_release is undefined

0 comments on commit 1e03751

Please sign in to comment.