diff --git a/assert-vars.yml b/assert-vars.yml new file mode 100644 index 0000000..7395ccf --- /dev/null +++ b/assert-vars.yml @@ -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 \ No newline at end of file diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..a70172d --- /dev/null +++ b/defaults/main.yml @@ -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 \ No newline at end of file diff --git a/main.yml b/main.yml index 8e1c073..a08b2f4 100644 --- a/main.yml +++ b/main.yml @@ -1,2 +1,10 @@ --- -- hosts: all \ No newline at end of file +- 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 + \ No newline at end of file