{"id":15867184,"url":"https://github.com/robertpeteuil/auto-host-config","last_synced_at":"2026-04-04T22:32:38.334Z","repository":{"id":130532236,"uuid":"101679848","full_name":"robertpeteuil/auto-host-config","owner":"robertpeteuil","description":"Rapid host configuration via Ansible - settings stored in playbook config file to allow easy creation of multiple configurations for different hosts and roles.","archived":false,"fork":false,"pushed_at":"2017-10-07T23:35:27.000Z","size":46,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"remote","last_synced_at":"2025-06-14T18:09:28.132Z","etag":null,"topics":["ansible","ansible-playbook","config-management","debian","linux","linux-configuration","linux-hosts","mac","personal-config","post-installation","power-management","provisioning","system-config","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertpeteuil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2017-08-28T19:27:40.000Z","updated_at":"2017-10-24T11:42:08.000Z","dependencies_parsed_at":"2023-06-02T01:00:23.620Z","dependency_job_id":null,"html_url":"https://github.com/robertpeteuil/auto-host-config","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"8ab011bcb96a226791fc3eff90ee5cc40b129235"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/robertpeteuil/auto-host-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertpeteuil%2Fauto-host-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertpeteuil%2Fauto-host-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertpeteuil%2Fauto-host-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertpeteuil%2Fauto-host-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertpeteuil","download_url":"https://codeload.github.com/robertpeteuil/auto-host-config/tar.gz/refs/heads/remote","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertpeteuil%2Fauto-host-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31416770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-playbook","config-management","debian","linux","linux-configuration","linux-hosts","mac","personal-config","post-installation","power-management","provisioning","system-config","ubuntu"],"created_at":"2024-10-05T23:41:39.416Z","updated_at":"2026-04-04T22:32:38.313Z","avatar_url":"https://github.com/robertpeteuil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auto Host Config - Remote Host Version\n### Rapid application of settings, configuration, updates and app installations on remote Linux hosts\n[![lang](https://img.shields.io/badge/language-ansible-3572A5.svg?style=flat-square)](https://github.com/robertpeteuil/auto-host-config)\n[![status](https://img.shields.io/badge/status-stable-brightgreen.svg?style=flat-square)](https://github.com/robertpeteuil/auto-host-config)\n\n---\n\nThis is an automated process to rapidly configure Linux hosts - this is the Remote Host Version.  There are two versions, each with their own git branch.  Make sure  you download the correct one:\n- Remote: for configuring a host from a separate control computer.  ex: configure a notebook from your desktop.\n- Local: for configuring a host directly.  ex: configure a notebook directly from that notebook.\n\nThis process supports across a variety of device types, including: notebooks, desktops, servers, cloud hosts, and embedded devices.  The initial release supports the configuration of Ubuntu-based hosts, with Redhat/Centos and Windows support planned.\n\nThis is implemented using a free, open-source utility called Ansible which runs on Windows, Mac and Linux.  Use of this process does not require previous knowledge of Ansible.\n\n### Requirements\nThe requirements are minimal:\n- The \"remote-host\" to be configured (referred to as \"target host\" below)\n  - SSH server installed and running (instructions below)\n  - A user account that allows SSH access and sudo capabilities\n- A second computer to use as the \"control computer\"\n  - If you want to configure it directly, switch to the \"local\" branch of this repo.\n  - Ansible and the repo files are installed on the \"control computer\"\n    - Ansible version 2.4.0.0 or later is required.\n\n### Setup\n\n**Ensure SSH is installed on target (if required)**\n- If you're installing Linux on a local machine or notebook, you may need to install it.\n  - Typing the following command into the terminal on the target will install it: `sudo apt-get install openssh-server`\n- On cloud instances/VMs, SSH is installed \u0026 running by default.\n\n**Install Ansible on the main computer**\n\nInstall Ansible via pip, package manager, or git\n- If you have Python and pip installed you can type `pip install ansible`\n- on linux, type `sudo apt-get install ansible`\n- on a mac with brew installed, type `brew install ansible`\n\n**Clone this repo to your main computer**\n\nCreate a directory, download the repo into it and `cd` to it with the following commands:\n\n```\nmkdir host-config\ngit clone https://github.com/robertpeteuil/auto-host-config host-config\ncd host-config\n```\n\nNote: you can replace `host-config` with a different folder-name, just make sure to use the same name in all three commands.\n\n**Rename example Inventory \u0026 Config files**\nCreate copies of the inventory and configuration files without the \".example\" suffix\n- The included script does this for you: `./rename-examples.sh`\n- The files can also be copied or renamed manually\n\n**Adjust \"inventory\" file**\nOpen the `inventory` file with your editor\n- replace `hostname.local` with the IP address or hostname of the target host\n- if the username on the target host is different than your main computer\n  - add the parameter `ansible_user=username` after the target hostname / IP address\n  - change `username` to match the username for the target host\n\n**Adjust settings in \"config.yml\"**\nopen the `config.yml` file with your editor.\n- `ssh_pub_key_path` specifies the public ssh-key that can be added as an authorized_user on the target host, review, edit, change or delete as necessary\n  - you can disable this by commenting-out or deleting the line\n- Review and adjust options for `reboot_after_fixes`, `set_pwless_sudo` and `ssh_disable_pw_logon` to your liking\n  - By default, all options except `reboot_after_fixes` are set to False\n- Any of the package lists below may be commented out as necessary\n- System package lists:\n  - `install_packages` - specifies packages to install via the package manager\n  - `remove_packages` - specifies packages to remove\n- Python package lists\n  - `python_upgrade_user` - libraries to upgrade to the latest version in the user directory\n  - `python_install_user` - libraries to install in the user context directory\n  - `python_install_sys` - libraries to install for the entire system\n  - `python_upgrade_sys` - libraries to upgrade to the latest version for the entire system\n\n**Select and run a playbook to configure target host(s)**\n- Run the primary playbook (you will be prompted for the password):\n  - `./main.yml`\n- Run an alternate playbook if you have certificate-authentication and passwordless sudo configured (this runs without a password prompt):\n  - `./main-sudo.yml`\n- Run a playbook that applies only the notebook and mac related hardware fixes (you will be prompted for a password):\n  - `./mac-fixes-only.yml`\n\n\n### Playbooks, Roles and Settings\n\n**Playbooks**\n- `main.yml` - the primary method of execution.  It prompts for the target host password and executes all three roles (described below).\n- `main-sudo.yml` - this is only for users who have configured the host for Ansible use (by running main.yml with ssh_pub_key_path pointing to their SSH certificate, and set_pwless_sudo set to True).\n- `mac-fixes-only.yml` - for users who only want to apply the hardware adjustments for Linux on a notebook or Mac.\n\n**Roles**\n- `config-linux-hw`: current HW adjustments are for linux installs on notebooks and macs\n- `config-linux-base`: installs/removes apt packages and installs/updates python modules\n- `config-linux-sys`: configure SSH security, enable no-spoof, install fail2ban and (optionally) set user account for Ansible use\n\n**Settings**\n- The host inventory file is the file named `inventory`\n- Configuration settings are consolidated in the file `config.yml`\n- Settings also exist in the default folder for each role\n  - Advanced Ansible users can use settings files within each role by removing the `vars_files` section from each playbooks\n\n\n### Acknowledgments\n\nThis playbook includes the [mountopts module](https://github.com/Uberspace/ansible-mountopts) by Uberspace in the library directory.  It's only used if the target computer is a notebook and the primary drive is an SSD.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertpeteuil%2Fauto-host-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertpeteuil%2Fauto-host-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertpeteuil%2Fauto-host-config/lists"}