From b8e5743d1c47a9fbe211fdb19ff39eac9c09e309 Mon Sep 17 00:00:00 2001 From: Felix Nehrke Date: Sat, 13 Sep 2025 03:12:53 +0200 Subject: [PATCH] Move local config into the root to make it easier to see The local config is intended to be configured per environment. Therefore it feels awkward to navigate deeply into the structures simply to adjust a local configuration. Furthermore this change allows me to make an assumption about the file right in the executed code, so if the file is not setup properly ansible will fail even before execution! --- .gitignore | 2 +- README.adoc | 2 +- .../localhost/local.config.yml.tpl => local.config.yml.tpl | 0 main.yml | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) rename group_vars/localhost/local.config.yml.tpl => local.config.yml.tpl (100%) diff --git a/.gitignore b/.gitignore index 808ca97..7c78f89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *.html *.pdf -group_vars/*/local.config.yml +local.config.yml password.txt # Created by https://www.toptal.com/developers/gitignore/api/vim,intellij diff --git a/README.adoc b/README.adoc index 7b58d46..635789c 100644 --- a/README.adoc +++ b/README.adoc @@ -29,7 +29,7 @@ The setup is very simple, just follow these steps and you're good to go: ---- git clone https://gitea.nehrke.info/nemoinho/dev-machine.git ~/Development/nemoinho/dev-machine # <1> cd $_ -cp global_vars/localhost/local.config.yml.tpl global_vars/localhost/local.config.yml # <2> +cp local.config.yml.tpl local.config.yml # <2> vi $_ # <3> vi password.txt # <4> ansible-galaxy install -r requirements.yml --upgrade # <5> diff --git a/group_vars/localhost/local.config.yml.tpl b/local.config.yml.tpl similarity index 100% rename from group_vars/localhost/local.config.yml.tpl rename to local.config.yml.tpl diff --git a/main.yml b/main.yml index 633969c..f8bcafc 100644 --- a/main.yml +++ b/main.yml @@ -1,5 +1,7 @@ --- - hosts: localhost + vars_files: + - local.config.yml roles: - role: roles/macos tags: [macos]