{"id":14984484,"url":"https://github.com/hanxhx/ansible-debian-bootstrap","last_synced_at":"2025-06-24T08:04:21.504Z","repository":{"id":34864852,"uuid":"38866407","full_name":"HanXHX/ansible-debian-bootstrap","owner":"HanXHX","description":"Ansible bootstrap role for Debian/Devuan/Ubuntu/Raspbian servers","archived":false,"fork":false,"pushed_at":"2024-04-30T09:52:21.000Z","size":148,"stargazers_count":53,"open_issues_count":6,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-24T08:04:19.699Z","etag":null,"topics":["ansible","ansible-role","ansible-roles","debian","devuan","hostname","ntp","sysctl","systemd"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HanXHX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-10T07:08:05.000Z","updated_at":"2025-02-01T14:57:46.000Z","dependencies_parsed_at":"2024-09-25T00:30:21.079Z","dependency_job_id":null,"html_url":"https://github.com/HanXHX/ansible-debian-bootstrap","commit_stats":{"total_commits":180,"total_committers":5,"mean_commits":36.0,"dds":0.2944444444444444,"last_synced_commit":"4e27dfead7cfbf405600538dd6c655d16ae8759d"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/HanXHX/ansible-debian-bootstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-debian-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-debian-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-debian-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-debian-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HanXHX","download_url":"https://codeload.github.com/HanXHX/ansible-debian-bootstrap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-debian-bootstrap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261632138,"owners_count":23187269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","ansible-roles","debian","devuan","hostname","ntp","sysctl","systemd"],"created_at":"2024-09-24T14:09:08.869Z","updated_at":"2025-06-24T08:04:21.174Z","avatar_url":"https://github.com/HanXHX.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible Debian/Devuan/Ubuntu/Raspbian bootstrap\n====================================================\n\n[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-HanXHX.debian_bootstrap-blue.svg)](https://galaxy.ansible.com/HanXHX/debian_bootstrap) ![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/hanxhx/ansible-debian-bootstrap/molecule.yml?branch=master)\n\nThis role bootstraps Debian/Devuan/Ubuntu/Raspbian hosts:\n\n- Configure APT (sources.list)\n- Install minimal packages (vim, htop...)\n- Install Intel/AMD microcode if needed\n- Install and configure NTP daemon ([OpenNTPd](http://www.openntpd.org/) or [NTP](http://support.ntp.org/))\n- Add groups, users with SSH key, sudoers\n- Deploy bashrc, vimrc for root\n- Update few alternatives\n- Configure system: hostname, timezone and locale\n- Purge, delete and avoid systemd if wanted\n- Sysctl tuning\n\nSupported versions\n\n| OS                     | Working      | Stable (active support) |\n| ---------------------- | -------      |-------------------------|\n| Debian Stretch (9)     | Yes          | No                      |\n| Debian Buster (10)     | Yes          | Yes                     |\n| Debian Bullseye (11)   | Yes          | Yes                     |\n| Debian Bookworm (12)   | Yes          | Yes                     |\n| Devuan Ascii (2)       | Yes          | No                      |\n| Raspbian Stretch (9)   | Experimental | No                      |\n| Raspbian Buster (10)   | Experimental | No                      |\n| Raspbian Bullseye (11) | Experimental | No                      |\n| Ubuntu Bionic (18.04)  | Yes          | No                      |\n| Ubuntu Focal (20.04)   | Experimental | No                      |\n| Ubuntu Jammy (22.04)   | Experimental | No                      |\n\nRequirements\n------------\n\n- Ansible \u003e= 2.11\n- Collections: [ansible.posix collection](https://galaxy.ansible.com/ansible/posix) / [community.general](https://galaxy.ansible.com/community/general)\n\nRole Variables\n--------------\n\n### APT configuration\n\nTheses variables define hostname to configure APT (normal repo and backports):\n\n- `dbs_apt_default_host`: repository host. It can replace the last one (installed with this role) with a new one\n- `dbs_apt_use_src`: install \"deb-src\" repositories (default: false)\n- `dbs_apt_components`: components uses in sources.list (default: \"main contrib non-free non-free-firmware\")\n\n### Role setup\n\n- `dbs_set_hostname`: if true, change hostname\n- `dbs_clean_hosts`: if true, manages `/etc/hosts` file\n- `dbs_set_locale`: if true, configure locales\n- `dbs_set_timezone`: if true, set timezone\n- `dbs_set_ntp`: if true, install and configure OpenNTPd\n- `dbs_set_apt`: if true, configure APT repository\n\n### System configuration\n\n- `dbs_hostname`: system hostname\n- `dbs_hostname_use_strategy`: strategy used to set hostname check \"use\" in [hostname module](https://docs.ansible.com/ansible/latest/modules/hostname_module.html). You should update this var only if hostname fails (in LXC for example).\n- `dbs_default_locale`: default system locale\n- `dbs_locales`: list of installed locales\n- `dbs_timezone`: system timezone. If you need a \"standard\" timezone like UTC, you must use prefix \"Etc/\" (ex: \"Etc/UTC\")\n- `dbs_sysctl_config`: hash of kernel parameters, see: [default/main.yml](default/main.yml)\n- `dbs_use_systemd`: delete systemd if set to false (persistent)\n- `dbs_use_dotfiles`: overwrite root dotfiles (bashrc, screenrc, vimrc)\n- `dbs_uninstall_packages`: packages list to uninstall\n\n### Alternatives\n\n- `dbs_alternative_editor`\n- `dbs_alternative_awk`\n\n### NTPd\n\n- `dbs_ntp_hosts`: hostnames NTP server list\n- `dbs_ntp_pkg`: package used to provide NTP: \"openntpd\" or \"ntp\"\n\n### Group\n\n- `dbs_groups`: list of group\n\nEach row have few keys:\n\n- `name`: (M) username on system\n- `system`: (O) yes/no (default: no)\n- `state`: (O) present/absent (default: present)\n\n(M) Mandatory\n(O) Optionnal\n\n### User\n\n- `dbs_users`: list of user\n\nEach row have few keys:\n\n- `name`: (M) username on system\n- `password`: (O) password with hash format (see [ansible doc](http://docs.ansible.com/ansible/latest/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module))\n- `clear_password`: (O) password as clear format (not recommanded)\n- `update_password`: (O) always / on\\_create\n- `shell`: (O) default is /bin/bash\n- `comment`: (O) default is an empty string\n- `sudo`: (O) boolean (true = can sudo)\n- `group`: (O) main group (default is `name` without password)\n- `groups`: (O) comma separated list of groups\n- `createhome`: (O) yes/no\n- `system`: (O) yes/no (default: no)\n- `ssh_keys`: (O) ssh public keys list\n- `state`: (O) present/absent (default: present)\n\n(M) Mandatory\n(O) Optionnal\n\nNotes:\n\n- if `password` is specified, `clear_password` is not used!\n- `clear_password` is not idempotent with `update_password` = always (default)\n\nFor more information, look [ansible user module doc](http://docs.ansible.com/ansible/latest/user_module.html).\n\n### Readonly vars\n\n- `dbs_packages`: list of packages to install\n- `dbs_microcode_apt_distribution`: location of package to install microcode\n- `dbs_distro_packages`: list specific package to install (related to OS version)\n- `dbs_is_docker`: boolean. Is true if current is a docker container\n\nDependencies\n------------\n\nNone.\n\nExample Playbook\n----------------\n\n    - hosts: servers\n      roles:\n         - { role: HanXHX.debian_bootstrap }\n\n\nAbout Docker\n------------\n\nDue to Docker limitations, theses features are disabled:\n\n- Removing systemd\n- Setting hostname\n- Configure sysctl\n\n\nHow to develop and test this role\n---------------------------------\n\n### Vagrant way\n\nInstall vagrant + virtualbox or docker\n\n```commandline\nvagrant up debian-bullseye # with virtualbox\nvagrant up docker-debian-bullseye # with docker\n```\n\n### Molecule way\n\nInstall:\n\n```commandline\npip install molecule molecule[docker]\n```\n\nRun:\n\n```commandline\nmolecule -vv -c molecule/_shared/base.yml converge -s ubuntu-22.04\n```\n\n\nLicense\n-------\n\nGPLv2\n\nDonation\n--------\n\nIf this code helped you, or if you’ve used them for your projects, feel free to buy me some :beers:\n\n- Bitcoin: `1BQwhBeszzWbUTyK4aUyq3SRg7rBSHcEQn`\n- Ethereum: `0x63abe6b2648fd892816d87a31e3d9d4365a737b5`\n- Litecoin: `LeNDw34zQLX84VvhCGADNvHMEgb5QyFXyD`\n- Monero: `45wbf7VdQAZS5EWUrPhen7Wo4hy7Pa7c7ZBdaWQSRowtd3CZ5vpVw5nTPphTuqVQrnYZC72FXDYyfP31uJmfSQ6qRXFy3bQ`\n\nNo crypto-currency? :star: the project is also a way of saying thank you! :sunglasses:\n\nAuthor Information\n------------------\n\n- Twitter: [@hanxhx_](https://twitter.com/hanxhx_)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanxhx%2Fansible-debian-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanxhx%2Fansible-debian-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanxhx%2Fansible-debian-bootstrap/lists"}