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
|
*.html
|
||||||
*.pdf
|
*.pdf
|
||||||
|
group_vars/*/local.config.yml
|
||||||
|
|
||||||
# Created by https://www.toptal.com/developers/gitignore/api/vim,intellij
|
# Created by https://www.toptal.com/developers/gitignore/api/vim,intellij
|
||||||
# Edit at https://www.toptal.com/developers/gitignore?templates=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
|
= My dev-machine setup
|
||||||
:source-highlighter: rouge
|
:source-highlighter: rouge
|
||||||
|
:icons: font
|
||||||
|
|
||||||
This ansible-playbook will setup my development machines and prepare them for work.
|
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
|
sudo apt install ansible git
|
||||||
----
|
----
|
||||||
|
|
||||||
.Prepararation on macos
|
.Prepararation on Macos
|
||||||
[source,bash]
|
[source,bash]
|
||||||
----
|
----
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
@@ -22,7 +23,19 @@ brew install ansible git
|
|||||||
----
|
----
|
||||||
|
|
||||||
== Setup
|
== 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]
|
[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
|
- name: Ensure tools to add additional apt sources
|
||||||
tags: [repos]
|
tags: [repos]
|
||||||
become: yes
|
become: yes
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
- name: Ensure correct hostname
|
||||||
|
hostname:
|
||||||
|
name: "{{ hostname }}"
|
||||||
|
use: macos
|
||||||
|
|
||||||
- name: "Ensure brew-packages"
|
- name: "Ensure brew-packages"
|
||||||
tags: [packages]
|
tags: [packages]
|
||||||
homebrew:
|
homebrew:
|
||||||
|
|||||||
Reference in New Issue
Block a user