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!
50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
= My dev-machine setup
|
|
:source-highlighter: rouge
|
|
:icons: font
|
|
|
|
This ansible-playbook will setup my development machines and prepare them for work.
|
|
|
|
== Prepararation
|
|
The setup is a bit different for linux and macos, since I can use the local package-manager on linux.
|
|
Though on macos I need to install `brew` first!
|
|
In both cases we need to install `ansible` and `git` though.
|
|
|
|
.Prepararation on Debian and Ubuntu
|
|
[source,bash]
|
|
----
|
|
sudo apt install ansible git
|
|
----
|
|
|
|
.Prepararation on Macos
|
|
[source,bash]
|
|
----
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
brew install ansible git
|
|
----
|
|
|
|
== Setup
|
|
The setup is very simple, just follow these steps and you're good to go:
|
|
|
|
[source,bash]
|
|
----
|
|
git clone https://gitea.nehrke.info/nemoinho/dev-machine.git ~/Development/nemoinho/dev-machine # <1>
|
|
cd $_
|
|
cp local.config.yml.tpl local.config.yml # <2>
|
|
vi $_ # <3>
|
|
vi password.txt # <4>
|
|
ansible-galaxy install -r requirements.yml --upgrade # <5>
|
|
ansible-playbook main.yml # <6>
|
|
git remote set-url origin git@gitea.nehrke.info:nemoinho/dev-machine.git # <7>
|
|
----
|
|
|
|
<1> Clone this repo into a suitable local directory (we use http since ssh is not ready yet)
|
|
<2> Configure the local environment
|
|
<3> Note, that haven't installed anything yet, so use the available tools!
|
|
<4> Provide the password for the ansible-vault, make sure the file only has one the password inside, nothing else
|
|
<5> Install further ansible-requirements
|
|
<6> Run the playbook that setup my system
|
|
<7> Adjust the git-url of this repo to use ssh, which is way more convenient
|
|
|
|
[NOTE]
|
|
Use a secure password and keep it in a password-manager.
|