---
- name: be sure all pre-req packages are installed
  yum: name={{item}} state=installed
  with_items:
    - open-vm-tools
    - PyYAML
    - perl
    - net-tools
    - chrony
    - python-six
    - iptables
    - iptables-services
    - docker

- name: be sure katello-agent is installed
  yum: name=katello-agent state=installed
  when: rhsm_activation_key is defined and rhsm_activation_key

- name: be sure chrony is configured
  template: src=chrony.conf.j2 dest=/etc/chrony.conf
  notify:
    - restart chronyd

- name: be sure chronyd is running and enabled
  service: name=chronyd state=started enabled=yes

- name: be sure openvmtools is running and enabled
  service: name=vmtoolsd state=started enabled=yes

- name: set link to localtime
  command: timedatectl set-timezone {{timezone}}
