add defauts + asseet-vars

This commit is contained in:
Gilles Mouchet 2024-05-22 17:02:34 +02:00
parent 7060f6537a
commit de020d3264
3 changed files with 24 additions and 1 deletions

8
assert-vars.yml Normal file
View File

@ -0,0 +1,8 @@
- name: verify if vars are defined and not empty
assert:
that:
- "{{ item }} is defined and {{ item }}|length > 0"
fail_msg: "'{{ item }}' is not defined or empty"
success_msg: "'{{ item }} ' is defined"
with_items:
- mail_domain

7
defaults/main.yml Normal file
View File

@ -0,0 +1,7 @@
---
#postfix
#mail_domain: gmotech.dyndns.org
#mail_relay_host: smtpauths.bluewin.ch
#mail_relay_host: smtp.gmail.com
# DNS
#dns_domain_search: gmotech.net

View File

@ -1,2 +1,10 @@
---
- hosts: all
- tasks:
- include_tasks: assert-vars.yml
# - include_tasks: disable_ipv6.yml
# - include_tasks: hosts.yml
# - include_tasks: inst_packages.yml
# - include_tasks: misc.yml