---
- hosts: all
  roles:
    - role: common
    - role: local_tests
    - role: thruk_developer
  tasks:
  - name: "omd config change"
    shell: "omd config demo change"
    args:
      stdin: |
        APACHE_MODE=own
        CORE=none
        PNP4NAGIOS=off
  - name: copy thruk_local.conf
    copy:
      src: /root/thruk_local.conf
      dest: /omd/sites/demo/etc/thruk/thruk_local.conf
      mode: 0644
      owner: demo
  - name: "wait for backend to come up"
    uri:
      url: "http://backend1/demo/thruk/cgi-bin/remote.cgi"
      validate_certs: False
      status_code: 200
    register: result
    until: result.status == 200
    retries: 180
    delay: 1
