Skip to content

lukas362/cPanel-CloudLinux-Automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cPanel + CloudLinux Automation

Ansible playbook for preparing a server with cPanel, CloudLinux, CageFS, MySQL Governor, and Imunify360.

image

What it does

The main playbook in site.yml runs these roles in order:

  1. cloudlinux - converts and configures the host for CloudLinux, installs base packages, and verifies the kernel and license.
  2. cpanel - installs cPanel, sets the hostname, and configures AutoSSL behavior.
  3. cagefs - installs and enables CageFS for all users.
  4. mysql_governor - installs and configures MySQL Governor.
  5. imunify360 - installs Imunify360 and opens the required firewall ports.

Requirements

  • Linux server with a RedHat-family distribution
  • Ansible installed on the control machine or local host
  • Root or sudo access on the target host
  • Valid CloudLinux, and Imunify360 license are needed

Inventory

Currently set to run towards localhost, If you want to run against another server, then just replace localhost with the targeted host.

[cPanel]
localhost ansible_connection=local

Configuration

Most variables can be found in group_vars/main.yml. Make sure to look trough this file if you need or want to add variables.

Secrets and license material should stay in secret.yml and be encrypted with Ansible Vault.

Vault setup

Create or edit the vault file with:

ansible-vault edit secret.yml

The vault password can be sotred inside of a .vault.yml

Running the playbook

Syntax check:

ansible-playbook -i inventory.ini --syntax-check site.yml

Run the playbook:

ansible-playbook -i inventory.ini site.yml

About

Ansible playbook for preparing a server with cPanel, CloudLinux, CageFS, MySQL Governor, and Imunify360

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors