From 272524137ff85531d3eeb3dc5879b5aa521531c4 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 21 May 2020 13:50:11 +0200 Subject: revamp dellos6 roles --- roles/dellos6/base/tasks/main.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'roles/dellos6/base/tasks/main.yml') diff --git a/roles/dellos6/base/tasks/main.yml b/roles/dellos6/base/tasks/main.yml index 30924abd..58c31d74 100644 --- a/roles/dellos6/base/tasks/main.yml +++ b/roles/dellos6/base/tasks/main.yml @@ -1,7 +1,28 @@ --- -- name: disable telnet and http server +## TODO: disable sntp if dellos6_sntp is not defined? +- name: configure SNTP + when: dellos6_sntp is defined dellos6_config: lines: - - ip telnet server disable - - no ip http server + - "sntp server {{ dellos6_sntp.server }}" + - sntp unicast client enable + notify: save configuration + +## TODO: disable logging if dellos6_logging is not defined? +- name: configure logging + when: dellos6_logging is defined + dellos6_config: + lines: + - "logging {{ dellos6_logging.server }}" + - exit + notify: save configuration + +## TODO: disable snmp if dellos6_snmp is not defined? +- name: configure snmp + when: dellos6_snmp is defined + dellos6_config: + lines: + - '{% if "location" in dellos6_snmp %}snmp-server location "{{ dellos6_snmp.location }}"{% else %}no snmp-server location{% endif %}' + - '{% if "contact" in dellos6_snmp %}snmp-server contact "{{ dellos6_snmp.contact }}"{% else %}no snmp-server contact{% endif %}' + - 'snmp-server community {{ dellos6_snmp.community }}' notify: save configuration -- cgit v1.2.3