---

- name: Install required packages
  package:
    name: "{{ item }}"
    state: present
  with_items:
    - bind-utils
    - ntp
  when: ansible_os_family == "RedHat"

- name: Install required packages
  apt:
    upgrade: true
    update_cache: true
    cache_valid_time: 3600
    name: "{{ item }}"
    state: present
    install_recommends: false
  with_items:
    - dnsutils
    - ntp
  when: ansible_os_family == "Debian"

- name: Create deployment user if required
  include_tasks: user.yml
  when: k8s_deployment_user is defined

- name: Set proper sysctl values
  import_tasks: sysctl.yml
