---
- hosts: all
  roles:
    - role: common
    - role: thruk_developer
  tasks:
  - name: "omd config change"
    shell: "omd config demo change"
    args:
      stdin: |
        APACHE_MODE=own
  - copy:
      src: /omd/sites/demo/share/doc/naemon/example.cfg
      dest: /omd/sites/demo/etc/naemon/conf.d/example.cfg
      owner: demo
      group: demo
  - name: create api key folder
    file:
      path: /omd/sites/demo/var/thruk/api_keys
      state: directory
      owner: demo
      group: demo
      mode: 0770
  - name: copy api key
    copy:
      src: /root/88db079c08a1aa46d4df2e5fb770d66d6572972cde4831ec64b20ccbe66f287b.SHA-256
      dest: /omd/sites/demo/var/thruk/api_keys/88db079c08a1aa46d4df2e5fb770d66d6572972cde4831ec64b20ccbe66f287b.SHA-256
      mode: 0600
      owner: demo
      group: demo
  - copy:
      src: /root/test.cfg
      dest: /omd/sites/demo/etc/naemon/conf.d/test.cfg
      owner: demo
      group: demo
