Skip to content

Commit

Permalink
Rhel9 support on aws (#1225)
Browse files Browse the repository at this point in the history
* Add rhel9 support to sumaform AWS
  • Loading branch information
maximenoel8 authored Dec 19, 2022
1 parent e65c642 commit e49e003
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
13 changes: 13 additions & 0 deletions backend_modules/aws/host/user_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ runcmd:
- zypper removerepo --all
- rm /etc/modprobe.d/50-ipv6.conf
%{ endif }

%{ if image == "rhel9"}
yum_repos:
# repo for salt
Expand All @@ -118,8 +119,20 @@ yum_repos:
gpgcheck: false
name: temp_tools_pool_repo
priority: 98
epel:
baseurl: http://download-cc-rdu01.fedoraproject.org/pub/epel/9/Everything/x86_64/
failovermethod: priority
enabled: true
gpgcheck: false
name: epel
priority: 98

packages: ["salt-minion"]
runcmd:
# WORKAROUND: rhel9 change ssh security for ssh key
- echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
- systemctl restart sshd

%{ endif }
%{ if image == "rhel8"}
yum_repos:
Expand Down
2 changes: 2 additions & 0 deletions modules/controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ module "controller" {
rocky8_sshminion = length(var.rocky8_sshminion_configuration["hostnames"]) > 0 ? var.rocky8_sshminion_configuration["hostnames"][0] : null
rocky9_minion = length(var.rocky9_minion_configuration["hostnames"]) > 0 ? var.rocky9_minion_configuration["hostnames"][0] : null
rocky9_sshminion = length(var.rocky9_sshminion_configuration["hostnames"]) > 0 ? var.rocky9_sshminion_configuration["hostnames"][0] : null
rhel9_minion = length(var.rhel9_minion_configuration["hostnames"]) > 0 ? var.rhel9_minion_configuration["hostnames"][0] : null
rhel9_sshminion = length(var.rhel9_sshminion_configuration["hostnames"]) > 0 ? var.rhel9_sshminion_configuration["hostnames"][0] : null
ubuntu1604_minion = length(var.ubuntu1604_minion_configuration["hostnames"]) > 0 ? var.ubuntu1604_minion_configuration["hostnames"][0] : null
ubuntu1604_sshminion = length(var.ubuntu1604_sshminion_configuration["hostnames"]) > 0 ? var.ubuntu1604_sshminion_configuration["hostnames"][0] : null
ubuntu1804_minion = length(var.ubuntu1804_minion_configuration["hostnames"]) > 0 ? var.ubuntu1804_minion_configuration["hostnames"][0] : null
Expand Down
14 changes: 14 additions & 0 deletions modules/controller/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,20 @@ variable "rocky9_sshminion_configuration" {
}
}

variable "rhel9_minion_configuration" {
description = "use module.<RHEL9_MINION>.configuration, see main.tf.libvirt-testsuite.example"
default = {
hostnames = []
}
}

variable "rhel9_sshminion_configuration" {
description = "use module.<RHEL9_SSHMINION>.configuration, see main.tf.libvirt-testsuite.example"
default = {
hostnames = []
}
}

variable "ubuntu1604_minion_configuration" {
description = "use module.<UBUNTU1604_MINION>.configuration, see main.tf.libvirt-testsuite.example"
default = {
Expand Down
2 changes: 2 additions & 0 deletions salt/controller/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export VIRTHOST_KVM_PASSWORD="linux" {% else %}# no KVM host defined {% endif %}
{% if grains.get('rocky8_sshminion') | default(false, true) %}export ROCKY8_SSHMINION="{{ grains.get('rocky8_sshminion') }}" {% else %}# no ROCKY8 ssh minion defined {% endif %}
{% if grains.get('rocky9_minion') | default(false, true) %}export ROCKY9_MINION="{{ grains.get('rocky9_minion') }}" {% else %}# no ROCKY9 minion defined {% endif %}
{% if grains.get('rocky9_sshminion') | default(false, true) %}export ROCKY9_SSHMINION="{{ grains.get('rocky9_sshminion') }}" {% else %}# no ROCKY9 ssh minion defined {% endif %}
{% if grains.get('rhel9_minion') | default(false, true) %}export RHEL9_MINION="{{ grains.get('rhel9_minion') }}" {% else %}# no RHEL9 minion defined {% endif %}
{% if grains.get('rhel9_sshminion') | default(false, true) %}export RHEL9_SSHMINION="{{ grains.get('rhel9_sshminion') }}" {% else %}# no RHEL9 ssh minion defined {% endif %}
{% if grains.get('ubuntu1604_minion') | default(false, true) %}export UBUNTU1604_MINION="{{ grains.get('ubuntu1604_minion') }}" {% else %}# no UBUNTU1604 minion defined {% endif %}
{% if grains.get('ubuntu1604_sshminion') | default(false, true) %}export UBUNTU1604_SSHMINION="{{ grains.get('ubuntu1604_sshminion') }}" {% else %}# no UBUNTU1604 ssh minion defined {% endif %}
{% if grains.get('ubuntu1804_minion') | default(false, true) %}export UBUNTU1804_MINION="{{ grains.get('ubuntu1804_minion') }}" {% else %}# no UBUNTU1804 minion defined {% endif %}
Expand Down

0 comments on commit e49e003

Please sign in to comment.