https://github.com/fwilhe2/system-automation
System Automation powered by Ansible™
https://github.com/fwilhe2/system-automation
ansible ansible-playbook developer-tools infrastructure-as-code linux
Last synced: 5 months ago
JSON representation
System Automation powered by Ansible™
- Host: GitHub
- URL: https://github.com/fwilhe2/system-automation
- Owner: fwilhe2
- License: mit
- Created: 2016-04-09T20:46:02.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2026-01-25T05:53:33.000Z (5 months ago)
- Last Synced: 2026-01-25T20:31:50.001Z (5 months ago)
- Topics: ansible, ansible-playbook, developer-tools, infrastructure-as-code, linux
- Language: Python
- Homepage:
- Size: 385 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
// SPDX-FileCopyrightText: Florian Wilhelm
// SPDX-License-Identifier: MIT
= System Automation powered by Ansible™
:experimental: yes
ifdef::env-github[]
:status:
:outfilesuffix: .adoc
:!toc-title:
:caution-caption: :fire:
:important-caption: :exclamation:
:note-caption: :paperclip:
:tip-caption: :bulb:
:warning-caption: :warning:
endif::[]
image::https://github.com/fwilhe2/system-automation/workflows/CI/badge.svg[CI Job]
image::https://api.reuse.software/badge/github.com/fwilhe2/system-automation[REUSE status]
A set of Ansible playbooks to setup Linux machines.
== Project Layout
This project contains multiple playbooks:
* `epel.yml`: Helper to add the Extra Packages for Enterprise Linux repos
* `snap.yml`: Remove/disable snap
* `common.yml`: Software and setup which does not require a graphical environment
* `minimal.yml`: Subset of the common playbook to get a nice cli environment without too many packages
* `desktop.yml`: Setup for desktop computers
* `vm-host.yml`: Skips development tools, meant for hosts running https://github.com/fwilhe2/dev[dev]
* `dev-env.yml`: Skips virtualization tools, meant for guests running https://github.com/fwilhe2/dev[dev]
== Preparation
.Preparation for Fedora
----
sudo dnf install -y ansible curl bash unzip
----
.Preparation for *EL-like
----
sudo dnf install -y ansible-core curl bash unzip
----
.Preparation for Ubuntu/Debian
----
sudo apt -y install ansible curl bash unzip
----
.Preparation for opensuse
----
sudo zypper --non-interactive install git ansible curl unzip bash
----
.Preparation for Archlinux
----
sudo pacman --sync --refresh --noconfirm ansible curl bash unzip git
----
== Kickstart (experimental)
If you don't mind the `curl | bash` thing, you might try running the playbook directly via:
----
# Common playbook
curl https://raw.githubusercontent.com/fwilhe2/system-automation/main/bootstrap.sh | bash
# Minimal playbook
curl https://raw.githubusercontent.com/fwilhe2/system-automation/main/bootstrap-minimal.sh | bash
----
This requires `ansible`, `curl`, `bash` and `unzip`.
== Setup (traditional)
.Run `common` playbook
----
ansible-playbook --ask-become-pass --inventory inventory common.yml
----
.Run `desktop` playbook
----
ansible-playbook --ask-become-pass --inventory inventory desktop.yml
----
== Testing
=== Containerfile
Containerfiles are available for testing.
They are run automatically via the CI workflow.
For running them locally, use:
.Test on Debian
----
docker build --build-arg=VERSION=debian:testing -t system-automation-test-debian-latest --file test/container/Containerfile.dpkg .
docker run --tty --volume $PWD:/mnt system-automation-test-debian-latest
----
.Test on Fedora
----
docker build --build-arg=VERSION=latest -t system-automation-test-fedora-latest --file test/container/Containerfile.fedora .
docker run --tty --volume $PWD:/mnt system-automation-test-fedora-latest
----
=== Lima
https://github.com/lima-vm/lima[Lima] is a tool written in go for running virtual machines.
Files in the root of this repo named like `lima_*.yaml` contain vm definitions for testing this repo.
.Running the playbook in a vm using lima
----
# pick the one you need
export SYSAUTO_LIMA_DISTRO=debian
export SYSAUTO_LIMA_DISTRO=fedora
limactl create --name=system-automation-$SYSAUTO_LIMA_DISTRO ./lima_$SYSAUTO_LIMA_DISTRO.yaml
limactl start system-automation-$SYSAUTO_LIMA_DISTRO
limactl shell system-automation-$SYSAUTO_LIMA_DISTRO
# Inside the vm, no password needed for become, just press enter
./run.sh
limactl stop system-automation-$SYSAUTO_LIMA_DISTRO
----
== License
Copyright © 2016-2025 Florian Wilhelm
Free use of this software is granted under the terms of the MIT License.
=== Copyright Notice
This project ships the following 3rd party software:
https://github.com/green-leader/ansible-role-codium[ansible-role-codium] (`roles/greenleader.codium`)::
Copyright © Sion Fandrick under the _MIT License_
https://github.com/iesplin/ansible-role-vscode[ansible-role-vscode] (`roles/iesplin.vscode`)::
Copyright © iesplin under the _MIT License_
https://github.com/gantsign/ansible-role-visual-studio-code-extensions[ansible-role-visual-studio-code-extensions] (`library/codium-extensions`)::
Copyright © John Freeman GantSign Ltd. Company No. 06109112 (registered in England) under the _MIT License_
https://git.sr.ht/~gotmax23/ansible-collection-epel[Ansible collection - gotmax23.epel] (`roles/gotmax23.epel*`)::
Copyright © 2022 Maxwell G (@gotmax23) under the _MIT License_
https://github.com/lima-vm/lima[lima - linux virtual machines] (`lima_*yaml`)::
Based on examples by Akihiro Suda and https://github.com/lima-vm/lima/graphs/contributors[the lima contributors] under the _Apache-2.0 license_
https://github.com/bodsch/ansible-snapd[Ansible Role: snapd] (`roles/bodsch.ansible-snapd`)::
Copyright © Bodo Schulz under the _BSD-2-Clause License_
== References
* http://www.whitewashing.de/2013/11/19/setting_up_development_machines_ansible_edition.html[Setting up development machines: Ansible edition]
* https://github.com/geerlingguy/mac-dev-playbook
* https://github.com/geerlingguy/ansible-role-docker