This is an Ansible playbook to automatically optimize and secure your servers for Kamal, for Ubuntu only.
Here's a quick video walkthrough of how this repo works:
It will automatically update your packages and configure these packages to secure your server(s):
The playbook also:
swap
using geerlingguy/ansible-role-swap.Clone the repo:
$ git clone git@github.com:guillaumebriday/kamal-ansible-manager.git
$ cd kamal-ansible-manager
Copy the inventory example file:
$ cp hosts.ini.example hosts.ini
Update the <host1>
with your server's IP address (you can have multiple servers):
$ vim hosts.ini
Install the requirements:
$ ansible-galaxy collection install -r requirements.yml
Variables can be configured in the playbook.yml
file.
Also, you can override default variables provided in geerlingguy/ansible-role-swap to adjust the swap settings.
For instance:
vars:
security_autoupdate_reboot: "true"
security_autoupdate_reboot_time: "03:00"
swap_file_size_mb: '1024'
Run the playbook:
$ ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts.ini playbook.yml
Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.
This project is released under the MIT license.