mirror of
https://gitlab.com/signalytic/platform-v2/experiments/node-config/common.git
synced 2026-09-11 09:41:28 +00:00
Merge branch 'develop' into 'main'
initial implementation: common config repo See merge request signalytic/platform-v2/experiments/node-config/common!1
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
[defaults]
|
||||||
|
inventory = localhost,
|
||||||
|
roles_path = ./roles
|
||||||
|
retry_files_enabled = False
|
||||||
|
interpreter_python = auto_silent
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
# Version of the common config repo, rendered into example.conf.
|
||||||
|
group_version: "common-1.0.0"
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
# Common playbook. Imported by the node-specific playbook in the local repo;
|
||||||
|
# can also be run on its own for testing.
|
||||||
|
- name: Common node configuration
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
vars_files:
|
||||||
|
- group_vars/all.yml
|
||||||
|
roles:
|
||||||
|
- role: base_packages
|
||||||
|
- role: example_config
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
apt_packages:
|
||||||
|
- xz-utils
|
||||||
|
- tree
|
||||||
|
- nano
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Install baseline packages
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: "{{ apt_packages }}"
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
cache_valid_time: 3600
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
signalytic_config_dir: /etc/signalytic
|
||||||
|
|
||||||
|
# Overridden by group_vars/all.yml (common repo) and host_vars.yml (local repo).
|
||||||
|
group_version: "unset"
|
||||||
|
host_version: "unset"
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Create signalytic config directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ signalytic_config_dir }}"
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Render example.conf
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: example.conf.j2
|
||||||
|
dest: "{{ signalytic_config_dir }}/example.conf"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
group_version = {{ group_version }}
|
||||||
|
host_version = {{ host_version }}
|
||||||
Reference in New Issue
Block a user