---
- ansible.builtin.copy: >
    src=docs-rsync.stg dest=/usr/local/bin/docs-rsync
    owner=root group=root mode=0755
  tags:
  - fedora-docs
  - fedora-docs/proxy
  when: env == "staging"

- ansible.builtin.copy: >
    src=docs-rsync dest=/usr/local/bin/docs-rsync
    owner=root group=root mode=0755
  tags:
  - fedora-docs
  - fedora-docs/proxy
  when: env == "production"

- ansible.builtin.copy: >
    src=cron-docs-rsync dest=/etc/cron.d/docs-rsync
    owner=root group=root mode=0644
  tags:
  - fedora-docs
  - fedora-docs/proxy
  when: env == "production"

- ansible.builtin.copy: >
    src=cron-docs-rsync.stg dest=/etc/cron.d/docs-rsync
    owner=root group=root mode=0644
  tags:
  - fedora-docs
  - fedora-docs/proxy
  when: env == "staging"

- ansible.builtin.copy: >
    src={{item}} dest=/etc/httpd/conf.d/{{website}}/{{item}}
    owner=root group=root mode=0644
  with_items:
  - fedora-docs.conf
  - fedora-docs-old.conf
  notify:
  - Reload proxyhttpd
  tags:
  - fedora-docs
  - fedora-docs/proxy
  when: env == "production"

- ansible.builtin.copy: >
    src={{item}}.stg dest=/etc/httpd/conf.d/{{website}}/{{item}}
    owner=root group=root mode=0644
  with_items:
  - fedora-docs.conf
  - fedora-docs-old.conf
  notify:
  - Reload proxyhttpd
  tags:
  - fedora-docs
  - fedora-docs/proxy
  when: env == "staging"
