---
- hosts: all
  roles:
    - role: common
    - role: thruk_developer
  tasks:
  - name: "omd config change"
    shell: "omd config demo change"
    args:
      stdin: |
        APACHE_MODE=own
        CORE=icinga2
        LIVESTATUS_TCP=on
        GRAFANA=on
        NAGFLUX=on
        PNP4NAGIOS=off
        INFLUXDB=off
  - shell: echo "testkey" > /omd/sites/demo/var/thruk/secret.key
  - file:
      path: /omd/sites/demo/var/thruk/secret.key
      mode: 0600
      owner: demo
      group: demo
  - copy:
      src: /root/more_hosts.conf
      dest: /omd/sites/demo/etc/icinga2/conf.d/more_hosts.conf
      owner: demo
      group: demo
