From d19448cf318af5739e7c70429197114398d86055 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Wed, 28 Dec 2022 19:18:22 +0100 Subject: [PATCH] feat: add ansible templates --- templates/hosts.ini.j2 | 2 ++ templates/main.yaml.j2 | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 templates/hosts.ini.j2 create mode 100644 templates/main.yaml.j2 diff --git a/templates/hosts.ini.j2 b/templates/hosts.ini.j2 new file mode 100644 index 0000000..b5762c4 --- /dev/null +++ b/templates/hosts.ini.j2 @@ -0,0 +1,2 @@ +[{{ hostname }}] +{{ ip }} diff --git a/templates/main.yaml.j2 b/templates/main.yaml.j2 new file mode 100644 index 0000000..b40d7c9 --- /dev/null +++ b/templates/main.yaml.j2 @@ -0,0 +1,10 @@ +--- +{% for vmo in vmList %} +- hosts: + roles: + - monitoring-client + - monitoring-logs + {% if vmo.hostname == "monitoring" %} + - monitoring-master + {% endif %} +{% endif %}