- name: Create directories
  file: state=directory
        path=/srv/web/{{item}}
        owner=apache group=apache mode=0755
        setype=httpd_sys_content_t seuser=system_u
  with_items:
  - developer.fedoraproject.org
  tags:
  - developer.fedoraproject.org

- name: Copy syncDeveloper script (stg)
  when: env == "staging"
  copy: >
    src=syncDeveloper.stg.sh dest=/usr/local/bin/syncDeveloper owner=root group=root
    mode=0755
  tags:
  - developer.fedoraproject.org

- name: Copy syncDeveloper script (prod)
  when: env == "production"
  copy: >
    src=syncDeveloper.sh dest=/usr/local/bin/syncDeveloper owner=root group=root
    mode=0755
  tags:
  - developer.fedoraproject.org

- name: install rss.py script
  copy: src=rss.py dest=/usr/local/bin/rss.py mode=0755 owner=root group=root
  tags:
  - developer.fedoraproject.org

- name: Install the syncDeveloper cron job
  copy: >
    src={{item}}.cron dest=/etc/cron.d/{{item}}.cron
    owner=root group=root mode=0644
  with_items:
  - syncDeveloper
  tags:
  - developer.fedoraproject.org
  - cron
