---
# tasks file for node
- name: Create hosts file
  template: src=hosts.j2 dest=/etc/hosts
  notify:
    - restart system

- name: Create resolv.conf file
  template: src=resolv.conf.j2 dest=/etc/resolv.conf
  when: name_prefix == 'node'

- name: Create resolv.conf file
  template: src=resolv.conf.kube.j2 dest=/etc/resolv.conf
  when: name_prefix == 'kube'

- name: Create hostname file
  template: src=hostname.j2 dest=/etc/hostname
  notify:
    - restart system

- name: Create interfaces file
  template: src=interfaces.j2 dest=/etc/network/interfaces
  when: name_prefix == 'node'
  notify:
    - restart system

- name: Create interfaces file
  template: src=interfaces.kube.j2 dest=/etc/network/interfaces
  when: name_prefix == 'kube'
  notify:
    - restart system

- name: Set timezone to Europe/Moscow
  timezone:
    name: Europe/Moscow

