Files
ansible/roles/common
Tuan-Dat Tran f0a45e3fda fix: configure explicit NTP servers in timesyncd instead of relying on DHCP
Gateway at 192.168.20.1 was being provided via DHCP as the NTP server but
does not serve NTP, causing NodeClockNotSynchronising across all nodes.
2026-04-20 20:56:30 +02:00
..
2025-11-07 20:44:14 +01:00

Ansible Role: common

This role configures a baseline set of common configurations for Debian-based systems, including time synchronization, essential packages, hostname, and specific developer tools.

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see vars/main.yml):

# A list of common packages to install via apt.
common_packages:
  - build-essential
  - curl
  - git
  - iperf3
  - neovim
  - rsync
  - smartmontools
  - sudo
  - systemd-timesyncd
  - tree
  - screen
  - bat
  - fd-find
  - ripgrep
  - nfs-common
  - open-iscsi
  - parted

# The hostname to configure.
hostname: "new-host"

Tasks

The role performs the following tasks:

  1. Configure Time: Sets up systemd-timesyncd and timezone.
  2. Configure Packages: Installs the list of common_packages.
  3. Configure Hostname: Sets the system hostname.
  4. Configure Extra-Packages:
    • Installs eza (modern ls replacement).
    • Installs bottom (process viewer).
    • Installs neovim from AppImage and clones a custom configuration.
  5. Configure Bash: Sets up bash aliases and prompt.
  6. Configure SSH: Configures sshd_config for security.

Dependencies

None.

Example Playbook

- hosts: servers
  roles:
    - role: common
      vars:
        hostname: "my-server"

License

MIT

Author Information

This role was created in 2025 by TuDatTr.