Allow the adjustment to local constraints and configure the hostname as an example
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -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
|
||||
|
||||
17
README.adoc
17
README.adoc
@@ -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]
|
||||
----
|
||||
|
||||
3
group_vars/localhost/local.config.yml.tpl
Normal file
3
group_vars/localhost/local.config.yml.tpl
Normal file
@@ -0,0 +1,3 @@
|
||||
# The hostname can be defined already, e.g. in a company setup, so please enter the expected hostname.
|
||||
hostname:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
- name: Ensure correct hostname
|
||||
hostname:
|
||||
name: "{{ hostname }}"
|
||||
use: macos
|
||||
|
||||
- name: "Ensure brew-packages"
|
||||
tags: [packages]
|
||||
homebrew:
|
||||
|
||||
Reference in New Issue
Block a user