Skip to content

Commit

Permalink
Add support for beta repos - appstream & baseos
Browse files Browse the repository at this point in the history
  • Loading branch information
matoval authored Aug 28, 2023
1 parent e63eb0c commit e7860c9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/284-add-support-for-beta-repo-setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- Add support for beta repos setup for appstream and baseos
13 changes: 13 additions & 0 deletions roles/setup_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ Example:
setup_server_rhsatellite_contentview: "RHEL_8"
```
### setup_server_beta_repos
Type: boolean
Required: true
This variable is used to setup beta repositories for appstream and baseos, set true to setup beta repositories and false to setup non-beta repositories.
Example:
```yaml
setup_server_beta_repos: true
```
## Variables Exported by the Role
None.
Expand Down
1 change: 1 addition & 0 deletions roles/setup_server/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
setup_server_rhsatellite: false
setup_server_beta_repos: false
16 changes: 16 additions & 0 deletions roles/setup_server/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@
ansible.builtin.include_role:
name: fedora.linux_system_roles.rhc
when:
- not setup_server_beta_repos
- 'ansible_distribution == "RedHat" and not setup_server_rhsatellite'
- '"rh-amazon-rhui-client" not in ansible_facts["packages"]'
- '"rhui-azure-rhel9" not in ansible_facts["packages"]'
- '"rhui-azure-rhel8" not in ansible_facts["packages"]'

- name: Setup Beta Repositories
vars:
rhc_repositories:
- {name: "*", state: disabled}
- {name: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-beta-rpms", state: enabled}
- {name: "rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-beta-rpms", state: enabled}
ansible.builtin.include_role:
name: fedora.linux_system_roles.rhc
when:
- setup_server_beta_repos
- 'ansible_distribution == "RedHat" and not setup_server_rhsatellite'
- '"rh-amazon-rhui-client" not in ansible_facts["packages"]'
- '"rhui-azure-rhel9" not in ansible_facts["packages"]'
Expand Down

0 comments on commit e7860c9

Please sign in to comment.