bngsudheer.centos_base
Role Description
Name: bngsudheer.centos_base
This role helps install common software packages and make some adjustments on a CentOS server.
By default, this role won’t change anything on the server. You need to activate certain options to modify its usual behavior.
After installing CentOS, this role will handle basic software installation and configuration:
- Install packages like Development Tools, mercurial, git, and firewalld
- Set up fail2ban to protect against SSH brute force attacks
- Configure the SSH settings to allow only key-based logins
- Install SELinux packages
Requirements
None.
Role Variables
Here are the role variables you can use:
Variable | Default Value | Description | Required? |
---|---|---|---|
centos_base_enable_epel | false | Enable EPEL Repository | No |
centos_base_secure_sshd | false | Secure SSH configuration | No |
centos_base_basic_packages | false | Install basic packages | No |
centos_base_basic_vim_tweaks | false | Add basic tweaks for VIM | No |
centos_base_htop_configuration | false | Basic configuration for htop | No |
centos_base_fail2ban_configuration | false | Basic configuration for fail2ban | No |
centos_base_selinux_packages | true | Install SELinux packages | No |
centos_base_firewalld_services | [] | Services to enable in firewalld | No |
centos_base_utility_packages | false | Install utility packages like screen, htop, wget | No |
centos_base_debug_packages | false | Install debugging tools | No |
centos_base_lockprg | false | Set LOCKPRG in .bashrc | No |
centos_base_security_packages | false | Install firewalld | No |
centos_base_firewalld | true | Whether to install and enable firewalld | No |
Dependencies
None.
Example Playbook
- hosts: servers
remote_user: root
vars:
- centos_base_enable_epel: true
- centos_base_basic_packages: true
- centos_base_secure_sshd: true
- centos_base_basic_vim_tweaks: true
- centos_base_htop_configuration: true
- centos_base_fail2ban_configuration: true
- centos_base_selinux_packages: true
- centos_base_firewalld_services: ['http', 'https']
roles:
- bngsudheer.centos_base
License
BSD
Author Information
Sudheer Satyanarayana
Informazioni sul progetto
Basic CentOS Configuration
Installa
ansible-galaxy install bngsudheer.centos_base
Licenza
bsd-3-clause
Download
5k
Proprietario
Software developer and DevOps consultant