Allow the adjustment to local constraints and configure the hostname as an example

This commit is contained in:
2025-09-12 18:22:00 +02:00
parent d1471e937a
commit c405e31f76
5 changed files with 29 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
*.html
*.pdf
group_vars/*/local.config.yml
# Created by https://www.toptal.com/developers/gitignore/api/vim,intellij
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,intellij

View File

@@ -1,5 +1,6 @@
= My dev-machine setup
:source-highlighter: rouge
:icons: font
This ansible-playbook will setup my development machines and prepare them for work.
@@ -14,7 +15,7 @@ In both cases we need to install `ansible` and `git` though.
sudo apt install ansible git
----
.Prepararation on macos
.Prepararation on Macos
[source,bash]
----
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@@ -22,7 +23,19 @@ brew install ansible git
----
== Setup
The setup is simple:
Make sure to configure the local environment:
This is done by copying `global_vars/localhost/local.config.yml.tpl` to `global_vars/localhost/local.config.yml` and adjust it to the local conditions.
[source,bash]
----
cp global_vars/localhost/local.config.yml.tpl global_vars/localhost/local.config.yml
vi $_
----
[NOTE]
We do not have installed anything yet, so we can only use the available tools of the environment.
After the configuration the setup is very simple:
[source,bash]
----

View File

@@ -0,0 +1,3 @@
# The hostname can be defined already, e.g. in a company setup, so please enter the expected hostname.
hostname:

View File

@@ -1,3 +1,8 @@
- name: Ensure correct hostname
hostname:
name: "{{ hostname }}"
use: systemd
- name: Ensure tools to add additional apt sources
tags: [repos]
become: yes

View File

@@ -1,3 +1,8 @@
- name: Ensure correct hostname
hostname:
name: "{{ hostname }}"
use: macos
- name: "Ensure brew-packages"
tags: [packages]
homebrew: