Skip to content

Commit 544d984

Browse files
committed
Add required Ansible roles installation
1 parent 335dbe8 commit 544d984

File tree

7 files changed

+36
-1
lines changed

7 files changed

+36
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
/.env
88
/.temp/dynamic_vars/*
99
/roles/*.*
10+
/roles/infrastructure-*
1011

1112
!.gitkeep

.rkd/makefile.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ tasks:
1010
git clone $INVENTORY_GIT_URL inventory
1111
fi
1212
13+
:node:install-roles:
14+
description: Installs roles from Ansible Galaxy
15+
steps: |
16+
ansible-galaxy install --roles-path=roles/ -r ./requirements.yml
17+
1318
:node:copy-host-defaults:
1419
description: "Copy default values for hosts in the inventory (warning: it will override existing files)"
1520
steps: cp -prv .templates/* ./

.templates/inventory/group_vars/all.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ default_role_basic_software:
126126
enforce_docker_update: no
127127

128128

129-
# https://github.com/riotkit-org/server-tweak
129+
# https://github.com/riotkit-org/infrastructure-ansible-tweak-os
130130
default_role_tune:
131131
# Be careful with setting this to "no", even security upgrades are able to break docker daemon. Its better to manually upgrade system.
132132
remove_unattended_upgrades: yes
@@ -142,3 +142,8 @@ default_role_logs:
142142
configure_systemd: yes
143143
systemd_max_logs_disk_space: 100M
144144
systemd_max_file_sec: 1month
145+
146+
147+
default_role_system_settings:
148+
timezone: Europe/Rome
149+
locale: "en_GB.UTF-8"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ $(./setup-venv.sh)
1919
cp .env-dist .env
2020
nano .env
2121

22+
rkd :install-roles
2223
rkd :setup
2324
rkd :copy-host-defaults
2425
```

ansible.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[defaults]
2+
roles_path = roles/

playbooks/prepare-machine.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@
2424
gather_facts: yes
2525
force_handlers: yes
2626
tasks:
27+
# ===================================
28+
# Set misc system settings eg. locale
29+
# ===================================
30+
- name: Set system settings
31+
when: role_system_settings is defined
32+
block:
33+
- name: Include required vars
34+
set_fact:
35+
args: "{{ default_role_system_settings | combine(role_system_settings | default({}), recursive=True) }}"
36+
37+
- include_role: name=system-settings
38+
tags: system_settings
39+
2740
# ==========
2841
# Multi User
2942
# ==========

requirements.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
roles:
2+
- src: blackandred.server_basic_software
3+
- src: blackandred.server_multi_user
4+
- src: git+https://github.com/riotkit-org/infrastructure-ansible-logs.git
5+
- src: blackandred.server_ssh_fallback_port
6+
- src: blackandred.server_basic_security
7+
- src: git+https://github.com/riotkit-org/infrastructure-ansible-tweak-os
8+
- src: blackandred.server_secure_storage

0 commit comments

Comments
 (0)