All Projects → HanXHX → Ansible Debian Bootstrap

HanXHX / Ansible Debian Bootstrap

Licence: gpl-2.0
Ansible bootstrap role for Debian/Devuan/Ubuntu/Kali Linux/Raspbian servers

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Ansible Debian Bootstrap

consul role
Ansible role to install Consul (cluster of) server/agent
Stars: ✭ 14 (-62.16%)
Mutual labels:  debian, ansible-role
tomcat role
Ansible role to install Apache Tomcat Java Servlet Container
Stars: ✭ 13 (-64.86%)
Mutual labels:  debian, ansible-role
sicherboot
Unmaintained systemd-boot integration with secure boot support; consider https://github.com/Foxboron/sbctl instead.
Stars: ✭ 31 (-16.22%)
Mutual labels:  debian, systemd
ansible-role-systemd-service
No description or website provided.
Stars: ✭ 37 (+0%)
Mutual labels:  systemd, ansible-role
wimpy.deploy
Ansible role to automate immutable infrastructure scheduling one docker container on one EC2 instance
Stars: ✭ 21 (-43.24%)
Mutual labels:  systemd, ansible-role
kafka role
Ansible role to install Apache Kafka
Stars: ✭ 18 (-51.35%)
Mutual labels:  debian, ansible-role
ansible-roles
My Ansible roles for Debian/Ubuntu
Stars: ✭ 57 (+54.05%)
Mutual labels:  debian, ansible-role
Ansible Role Hardening
Ansible role to apply a security baseline. Systemd edition.
Stars: ✭ 188 (+408.11%)
Mutual labels:  debian, systemd
jira role
Ansible role to install Atlassian JIRA
Stars: ✭ 13 (-64.86%)
Mutual labels:  debian, ansible-role
ansible-mdadm
No description or website provided.
Stars: ✭ 48 (+29.73%)
Mutual labels:  debian, ansible-role
ansible-haproxy
Installs and configures HAProxy
Stars: ✭ 19 (-48.65%)
Mutual labels:  debian, ansible-role
ansible-kafka
Ansible role for installing and configuring Apache Kafka on RedHat and Debian platforms.
Stars: ✭ 56 (+51.35%)
Mutual labels:  debian, ansible-role
ansible-role-docker-ce
Ansible role to install Docker CE on AlmaLinux/Rocky/CentOS/Fedora/RHEL(Redhat)/Ubuntu/Debian/Mint/Raspbian
Stars: ✭ 73 (+97.3%)
Mutual labels:  debian, ansible-role
ansible-role-containerized-wordpress
Deploy & run Docker Compose project for WordPress instance with Let's Encrypt HTTPS encryption
Stars: ✭ 15 (-59.46%)
Mutual labels:  debian, ansible-role
Ansible Restic
Deploy restic backup program
Stars: ✭ 29 (-21.62%)
Mutual labels:  ansible-role
Alacritty Debian
Debian packages for alacritty.
Stars: ✭ 34 (-8.11%)
Mutual labels:  debian
Spotify Linux Installer
Install latest Spotify on Linux
Stars: ✭ 28 (-24.32%)
Mutual labels:  debian
Nagios Nrpe Server
Nagios NRPE Server Role for Ansible
Stars: ✭ 27 (-27.03%)
Mutual labels:  ansible-role
Fileshare
Debian/Ubuntu applet for screenshots and images sharing using popular online services
Stars: ✭ 35 (-5.41%)
Mutual labels:  debian
Ansible Supervisor
Ansible role to set up (the latest or a specific version of) supervisor in Debian-like systems
Stars: ✭ 32 (-13.51%)
Mutual labels:  debian

Ansible Debian/Devuan/Kali/Ubuntu/Raspbian bootstrap

Ansible Galaxy Build Status

This role bootstraps Debian/Devuan/Kali/Ubuntu/Raspbian hosts:

  • Configure APT (sources.list)
  • Install minimal packages (vim, htop...)
  • Install Intel/AMD microcode if needed
  • Install and configure NTP daemon (OpenNTPd or NTP)
  • Add groups, users with SSH key, sudoers
  • Deploy bashrc, vimrc for root
  • Update few alternatives
  • Configure system: hostname, timezone and locale
  • Purge, delete and avoid systemd if wanted
  • Sysctl tuning

Supported versions

OS Working Stable (active support)
Debian Jessie (8) Yes Yes
Debian Stretch (9) Yes Yes
Debian Buster (10) Yes Yes
Devuan Jessie (1) Yes No
Devuan Ascii (2) Yes No
Kali Linux Partial No
Raspbian Stretch (9) Experimental No
Raspbian Buster (10) Experimental No
Ubuntu Bionic (18.04) Yes No

Requirements

Min Ansible 2.9

Role Variables

APT configuration

Theses variables define hostname to configure APT (normal repo and backports):

  • dbs_apt_default_host: repository host. It can replace the last one (installed with this role) with a new one
  • dbs_apt_use_src: install "deb-src" repositories (default: false)
  • dbs_apt_components: components uses in sources.list (default: "main contrib non-free")

Role setup

  • dbs_set_hostname: if true, change hostname
  • dbs_clean_hosts: if true, manages /etc/hosts file
  • dbs_set_locale: if true, configure locales
  • dbs_set_timezone: if true, set timezone
  • dbs_set_ntp: if true, install and configure OpenNTPd
  • dbs_set_apt: if true, configure APT repository

System configuration

  • dbs_hostname: system hostname
  • dbs_hostname_use_strategy: strategy used to set hostname check "use" in hostname module. You should update this var only if hostname fails (in LXC for example).
  • dbs_default_locale: default system locale
  • dbs_locales: list of installed locales
  • dbs_timezone: system timezone. If you need a "standard" timezone like UTC, you must use prefix "Etc/" (ex: "Etc/UTC")
  • dbs_sysctl_config: hash of kernel parameters, see: default/main.yml
  • dbs_use_systemd: delete systemd if set to false (persistent)
  • dbs_use_dotfiles: overwrite root dotfiles (bashrc, screenrc, vimrc)
  • dbs_uninstall_packages: packages list to uninstall

Alternatives

  • dbs_alternative_editor
  • dbs_alternative_awk

NTPd

  • dbs_ntp_hosts: hostnames NTP server list
  • dbs_ntp_pkg: package used to provide NTP: "openntpd" or "ntp"

Group

  • dbs_groups: list of group

Each row have few keys:

  • name: (M) username on system
  • system: (O) yes/no (default: no)
  • state: (O) present/absent (default: present)

(M) Mandatory (O) Optionnal

User

  • dbs_users: list of user

Each row have few keys:

  • name: (M) username on system
  • password: (O) password with hash format (see ansible doc)
  • clear_password: (O) password as clear format (not recommanded)
  • update_password: (O) always / on_create
  • shell: (O) default is /bin/bash
  • comment: (O) default is an empty string
  • sudo: (O) boolean (true = can sudo)
  • group: (O) main group (default is name without password)
  • groups: (O) comma separated list of groups
  • createhome: (O) yes/no
  • system: (O) yes/no (default: no)
  • ssh_keys: (O) ssh public keys list
  • state: (O) present/absent (default: present)

(M) Mandatory (O) Optionnal

Notes:

  • if password is specified, clear_password is not used!
  • clear_password is not idempotent with update_password = always (default)

For more information, look ansible user module doc.

Readonly vars

  • dbs_packages: list of packages to install
  • dbs_microcode_apt_distribution: location of package to install microcode
  • dbs_distro_packages: list specific package to install (related to OS version)
  • dbs_is_docker: boolean. Is true if current is a docker container

Dependencies

None.

Example Playbook

- hosts: servers
  roles:
     - { role: HanXHX.debian_bootstrap }

About Docker

Due to Docker limitations, theses features are disabled:

  • Removing systemd
  • Setting hostname
  • Configure sysctl

License

GPLv2

Donation

If this code helped you, or if you’ve used them for your projects, feel free to buy me some 🍻

  • Bitcoin: 1BQwhBeszzWbUTyK4aUyq3SRg7rBSHcEQn
  • Ethereum: 0x63abe6b2648fd892816d87a31e3d9d4365a737b5
  • Litecoin: LeNDw34zQLX84VvhCGADNvHMEgb5QyFXyD
  • Monero: 45wbf7VdQAZS5EWUrPhen7Wo4hy7Pa7c7ZBdaWQSRowtd3CZ5vpVw5nTPphTuqVQrnYZC72FXDYyfP31uJmfSQ6qRXFy3bQ

No crypto-currency? ⭐️ the project is also a way of saying thank you! 😎

Author Information

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].