---
- hosts: all
  roles:
    - role: common
    - role: thruk_developer
  tasks:
  - name: "omd config change"
    shell: "omd config demo change"
    args:
      stdin: |
        APACHE_MODE=own
        LIVESTATUS_TCP=on
  - copy:
      src: /omd/sites/demo/share/doc/naemon/example.cfg
      dest: /omd/sites/demo/etc/naemon/conf.d/example.cfg
      owner: demo
      group: demo
  - copy:
      src: /root/thruk_local.conf
      dest: /omd/sites/demo/etc/thruk/thruk_local.conf
      owner: demo
      group: demo
  - name: "wait for oauth server to come up"
    uri:
      url: "http://192.168.105.3:8080/default/.well-known/openid-configuration"
      validate_certs: False
      status_code: 200
    register: result
    until: result.status == 200
    retries: 180
    delay: 1

