cPanel is not supported on Debian or Ubuntu.
Official support is for RHEL-compatible systems.
- name: cPanel precheck for Debian/Ubuntu hosts
hosts: cpanel_debian
become: true
tasks:
- name: Stop because cPanel is unsupported on Debian/Ubuntu
ansible.builtin.fail:
msg: "cPanel is unsupported on Debian/Ubuntu. Use AlmaLinux/RockyLinux/RHEL."
- name: Install cPanel on RHEL-compatible hosts
hosts: cpanel_rhel
become: true
tasks:
- name: Ensure required base tools are present
ansible.builtin.dnf:
name:
- perl
- curl
state: present
- name: Disable NetworkManager as required by cPanel
ansible.builtin.systemd:
name: NetworkManager
state: stopped
enabled: false
failed_when: false
- name: Download cPanel installer
ansible.builtin.get_url:
url: https://securedownloads.cpanel.net/latest
dest: /root/cpanel-latest
mode: "0755"
- name: Run cPanel installer
ansible.builtin.command: /root/cpanel-latest
args:
creates: /usr/local/cpanel/cpanel
ansible-playbook -i inventory.ini cpanel-install.yml
We develop tailored automation solutions for:
Let’s discuss your requirements: office@linux-server-admin.com | Contact