From 278503d2d30e25fbeb9c1fbb8f5cfc40cd62720a Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Wed, 27 Mar 2019 07:09:45 +0000 Subject: [PATCH] Remove network tasks from common role --- roles/common/defaults/main.yaml | 4 ---- roles/common/handlers/main.yaml | 6 ------ roles/common/tasks/main.yaml | 6 ------ roles/common/templates/resolv.conf.j2 | 8 -------- roles/common/vars/Ubuntu-18.yaml | 1 - 5 files changed, 25 deletions(-) delete mode 100644 roles/common/templates/resolv.conf.j2 diff --git a/roles/common/defaults/main.yaml b/roles/common/defaults/main.yaml index 85d7f26..0174e31 100644 --- a/roles/common/defaults/main.yaml +++ b/roles/common/defaults/main.yaml @@ -1,10 +1,6 @@ --- cron_service_name: cron -resolv_nameserver: [] -resolv_options: - - edns0 - timezone: UTC # vim:ft=yaml.ansible: diff --git a/roles/common/handlers/main.yaml b/roles/common/handlers/main.yaml index 5469bfb..3f2d994 100644 --- a/roles/common/handlers/main.yaml +++ b/roles/common/handlers/main.yaml @@ -1,10 +1,4 @@ --- -- name: "restart resolv" - service: - name: "{{ resolv_service_name }}" - state: restarted - when: resolv_service_name is defined - - name: restart cron service: name: "{{ cron_service_name }}" diff --git a/roles/common/tasks/main.yaml b/roles/common/tasks/main.yaml index 8774f1a..8a8ad35 100644 --- a/roles/common/tasks/main.yaml +++ b/roles/common/tasks/main.yaml @@ -12,12 +12,6 @@ state: present with_items: "{{ sys_utils }}" -- name: configure resolv.conf - template: - src: resolv.conf.j2 - dest: /etc/resolv.conf - notify: "restart resolv" - - name: configure system timezone timezone: name: "{{ timezone }}" diff --git a/roles/common/templates/resolv.conf.j2 b/roles/common/templates/resolv.conf.j2 deleted file mode 100644 index f737c25..0000000 --- a/roles/common/templates/resolv.conf.j2 +++ /dev/null @@ -1,8 +0,0 @@ -# {{ ansible_managed }} - -{% for ns in resolv_nameserver %} -nameserver {{ ns }} -{% endfor %} -{% if resolv_options is defined %} -options {{ resolv_options | join(' ') }} -{% endif %} diff --git a/roles/common/vars/Ubuntu-18.yaml b/roles/common/vars/Ubuntu-18.yaml index c449429..3a79a49 100644 --- a/roles/common/vars/Ubuntu-18.yaml +++ b/roles/common/vars/Ubuntu-18.yaml @@ -1,4 +1,3 @@ --- -resolv_service_name: systemd-resolved.service # vim:ft=yaml.ansible: