Skip to content

An ansible playbook that runs a number of roles that together perform some basic server setup and hardening.

License

Notifications You must be signed in to change notification settings

glillico/server-setup

Repository files navigation

server-setup

An ansible playbook that runs a number of roles that together perform some basic server setup and hardening.

Usage

  • Clone this repository.
    • $ git clone https://github.com/glillico/server-setup.git
    • Change to the repositories directory.
      • $ cd server-setup
    • Install requirements.
      • $ ansible-galaxy install -r requirements.yml
    • Make a copy of the file example.config.yml and modify it to meet your requirements.
      • $ cp example-config.yml config.yml
    • Make a copy of the file example.inventory.ini and modify it to meet your requirements.
      • $ cp example-inventory.ini inventory.ini
    • Copy the ssh keys for your initial user into the keys directory, and modify the config.yml file appropriately.
    • Run the playbook.
      • $ ansible-playbook main.yml

Using tags

  • It is possible run a specifc section of the playbook by using the ansible-playbook's --tags feature.
    • $ ansible-playbook main.yml -t "docker,reboot"
  • The available tage are
    • add_rm_pkgs, auto_pkg_updates, configure_sudo, docker, fail2ban, firewall, hostname, issue, ntp, reboot, selinux, host_keys, ssh_keys, sshd, sync_sudo, update_pkgs, users

Role Information

See the individual roles for variable descriptions.

License

MIT

Author Information

Created in 2022 by Graham Lillico.

About

An ansible playbook that runs a number of roles that together perform some basic server setup and hardening.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published