Skip to content

Commit 23eb9fc

Browse files
authored
Add support for el10 (#206)
1 parent 892a83c commit 23eb9fc

File tree

7 files changed

+14
-45
lines changed

7 files changed

+14
-45
lines changed

Ansible/roles/cloudstack-manager/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int == 8 )
5252

5353
- include: ./el9.yml
54-
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int == 9 )
54+
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int >= 9 )
5555

5656
- include: ./suse.yml
5757
when: ansible_distribution == 'SUSE'

Ansible/roles/cloudstack-manager/tasks/setup-mgmt.yml

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
- debug:
1212
msg: "cloudstack not cloud is {{ path_is_cloudstack.stat.exists }} and the OS version is {{ ansible_distribution_major_version }}"
1313

14-
- name: Setup CloudStack Manager (centos/rhel6)
14+
- name: Setup CloudStack Manager (centos/rhel8+/suse/ubuntu/debian or centos/rhel7 ACS < 4.6)
1515
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
16-
when: (ansible_distribution_major_version|int == 6) and (path_is_cloudstack.stat.exists|bool == True)
16+
when: >
17+
((ansible_distribution_major_version|int == 6) and (path_is_cloudstack.stat.exists|bool == True)) or
18+
((ansible_distribution_major_version == "7") and (env_numversion | version_compare('4.6','<'))) or
19+
(ansible_distribution in ["SUSE", "Ubuntu", "Debian"] or ansible_distribution_major_version|int >= 8)
1720
tags:
1821
- setup_mgmt
1922

@@ -34,39 +37,3 @@
3437
when: (ansible_distribution_major_version == "7") and (env_numversion | version_compare('4.6','>=')) and (env_numversion | version_compare('4.11','<'))
3538
tags:
3639
- setup_mgmt
37-
38-
- name: Setup CloudStack Manager (centos/rhel7) ACS < 4.6
39-
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
40-
when: (ansible_distribution_major_version == "7") and (env_numversion | version_compare('4.6','<'))
41-
tags:
42-
- setup_mgmt
43-
44-
- name: Setup CloudStack Manager (centos/rhel8)
45-
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
46-
when: ansible_distribution_major_version|int == 8
47-
tags:
48-
- setup_mgmt
49-
50-
- name: Setup CloudStack Manager (SUSE)
51-
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
52-
when: ansible_distribution == "SUSE"
53-
tags:
54-
- setup_mgmt
55-
56-
- name: Setup CloudStack Manager (Ubuntu)
57-
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
58-
when: ansible_distribution == "Ubuntu"
59-
tags:
60-
- setup_mgmt
61-
62-
- name: Setup CloudStack Manager (Debian)
63-
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
64-
when: ansible_distribution == "Debian"
65-
tags:
66-
- setup_mgmt
67-
68-
- name: Setup CloudStack Manager (el9)
69-
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
70-
when: ansible_distribution_major_version|int == 9
71-
tags:
72-
- setup_mgmt

Ansible/roles/kvm/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@
7373
tags:
7474
- kvm
7575

76-
- name: Configure EL9 VMs for KVM
76+
- name: Configure EL9 or EL10 VMs for KVM
7777
include: ./el9.yml
78-
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int == 9 )
78+
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int >= 9 )
7979
tags:
8080
- kvm
8181

Ansible/roles/mysql/tasks/el9.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
- name: Ensure mysql server is installed
6464
dnf:
65-
name: mysql-server
65+
name: mysql*-server
6666
state: present
6767
register: mysqlinstalled
6868
tags:
@@ -98,7 +98,7 @@
9898
# - name: Nuke everything since it's starting from scratch
9999
# shell: rm -rf /var/lib/mysql/*
100100

101-
- name: Ensure MySQL service is started and set to start on boot (el9)
101+
- name: Ensure MySQL service is started and set to start on boot (el9/el10)
102102
shell: systemctl enable mysqld && systemctl restart mysqld
103103
when: mysqlinstalled.changed
104104
tags:

Ansible/roles/mysql/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
- mysqlconf
7878

7979
- include: ./el9.yml
80-
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int == 9 )
80+
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int >= 9 )
8181
tags:
8282
- mysql
8383
- mysqlconf

Ansible/roles/mysql/templates/my-centos8.cnf.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ datadir=/var/lib/mysql
2222
max_connections={{ mysql_max_connections }}
2323
skip_name_resolve
2424

25+
{% if ansible_distribution_major_version|int < 10 %}
2526
default_authentication_plugin=mysql_native_password
27+
{% endif %}
2628

2729
innodb_buffer_pool_size={{ mysql_innodb_buffer_pool_size }}
2830
innodb_file_per_table=1

Ansible/roles/timezone/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int == 8 )
3535

3636
- include: ./el9.yml
37-
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int == 9 )
37+
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int >= 9 )
3838

3939
- include: ./ubuntu.yml
4040
when: ansible_distribution == 'Ubuntu'

0 commit comments

Comments
 (0)