---
- hosts: all
  roles:
    - role: common
    - role: thruk_developer
  tasks:
  - name: "create secret.key"
    shell: echo "sub_omd_key" > /omd/sites/demo/var/thruk/secret.key
  - name: "set permissions on secret.key"
    file:
      path: /omd/sites/demo/var/thruk/secret.key
      mode: 0600
      owner: demo
      group: demo

  - name: "copy test.cfg"
    copy:
      src: /root/test.cfg
      dest: /omd/sites/demo/etc/naemon/conf.d/test.cfg
      owner: demo
      group: demo

  - name: "thruk cron install "
    shell: sudo su - demo -c "thruk cron install"
