Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ansible/roles/cloudstack-manager/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int == 8 )

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

- include: ./suse.yml
when: ansible_distribution == 'SUSE'
Expand Down
43 changes: 5 additions & 38 deletions Ansible/roles/cloudstack-manager/tasks/setup-mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
- debug:
msg: "cloudstack not cloud is {{ path_is_cloudstack.stat.exists }} and the OS version is {{ ansible_distribution_major_version }}"

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

Expand All @@ -34,39 +37,3 @@
when: (ansible_distribution_major_version == "7") and (env_numversion | version_compare('4.6','>=')) and (env_numversion | version_compare('4.11','<'))
tags:
- setup_mgmt

- name: Setup CloudStack Manager (centos/rhel7) ACS < 4.6
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
when: (ansible_distribution_major_version == "7") and (env_numversion | version_compare('4.6','<'))
tags:
- setup_mgmt

- name: Setup CloudStack Manager (centos/rhel8)
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
when: ansible_distribution_major_version|int == 8
tags:
- setup_mgmt

- name: Setup CloudStack Manager (SUSE)
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
when: ansible_distribution == "SUSE"
tags:
- setup_mgmt

- name: Setup CloudStack Manager (Ubuntu)
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
when: ansible_distribution == "Ubuntu"
tags:
- setup_mgmt

- name: Setup CloudStack Manager (Debian)
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
when: ansible_distribution == "Debian"
tags:
- setup_mgmt

- name: Setup CloudStack Manager (el9)
shell: sleep {{ play_hosts.index(inventory_hostname) | int * 15 }} && /usr/bin/cloudstack-setup-management
when: ansible_distribution_major_version|int == 9
tags:
- setup_mgmt
4 changes: 2 additions & 2 deletions Ansible/roles/kvm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
tags:
- kvm

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

Expand Down
4 changes: 2 additions & 2 deletions Ansible/roles/mysql/tasks/el9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

- name: Ensure mysql server is installed
dnf:
name: mysql-server
name: mysql*-server
state: present
register: mysqlinstalled
tags:
Expand Down Expand Up @@ -98,7 +98,7 @@
# - name: Nuke everything since it's starting from scratch
# shell: rm -rf /var/lib/mysql/*

- name: Ensure MySQL service is started and set to start on boot (el9)
- name: Ensure MySQL service is started and set to start on boot (el9/el10)
shell: systemctl enable mysqld && systemctl restart mysqld
when: mysqlinstalled.changed
tags:
Expand Down
2 changes: 1 addition & 1 deletion Ansible/roles/mysql/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
- mysqlconf

- include: ./el9.yml
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int == 9 )
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int >= 9 )
tags:
- mysql
- mysqlconf
Expand Down
2 changes: 2 additions & 0 deletions Ansible/roles/mysql/templates/my-centos8.cnf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ datadir=/var/lib/mysql
max_connections={{ mysql_max_connections }}
skip_name_resolve

{% if ansible_distribution_major_version|int < 10 %}
default_authentication_plugin=mysql_native_password
{% endif %}

innodb_buffer_pool_size={{ mysql_innodb_buffer_pool_size }}
innodb_file_per_table=1
Expand Down
2 changes: 1 addition & 1 deletion Ansible/roles/timezone/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
when: ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' ) and ( ansible_distribution_major_version|int == 8 )

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

- include: ./ubuntu.yml
when: ansible_distribution == 'Ubuntu'
Expand Down