move this before we start copr-backend service

This commit is contained in:
Miroslav Suchý 2015-05-19 11:50:03 +02:00
parent 702d316847
commit d0131dd4f0

View file

@ -139,6 +139,28 @@
notify:
- restart logstash
- name: get owner for results dir
stat: path=/var/lib/copr/public_html
register: copr_results_dir_st
- name: change owner for results dir if it isn't copr
shell: "chown -R copr:copr /var/lib/copr/public_html"
when: copr_results_dir_st.stat.pw_name != "copr"
- command: "ls -dZ /var/lib/copr/public_html/"
register: public_html_ls
- name: update selinux context for results if root folder does not have proper type
command: "restorecon -vvRF /var/lib/copr/public_html/"
when: public_html_ls is defined and 'copr_data_t' not in public_html_ls.stdout
- name: install cert to access fed-cloud09
# TODO: remove this when fed-cloud09 receives external cert
include: install_cloud_cert.yml
- name: set acl for logstash to access httpd logs
acl: name=/var/log/lighttpd entity=logstash etype=user permissions=rx state=present
- name: enable and run copr-backend services
service: name="{{ item }}" enabled=yes state=running
with_items:
@ -164,25 +186,3 @@
- name: setup monitoring
include: "monitoring.yml"
- name: get owner for results dir
stat: path=/var/lib/copr/public_html
register: copr_results_dir_st
- name: change owner for results dir if it isn't copr
shell: "chown -R copr:copr /var/lib/copr/public_html"
when: copr_results_dir_st.stat.pw_name != "copr"
- command: "ls -dZ /var/lib/copr/public_html/"
register: public_html_ls
- name: update selinux context for results if root folder does not have proper type
command: "restorecon -vvRF /var/lib/copr/public_html/"
when: public_html_ls is defined and 'copr_data_t' not in public_html_ls.stdout
- name: install cert to access fed-cloud09
# TODO: remove this when fed-cloud09 receives external cert
include: install_cloud_cert.yml
- name: set acl for logstash to access httpd logs
acl: name=/var/log/lighttpd entity=logstash etype=user permissions=rx state=present