Switch some shell commands to file for idempotency

This commit is contained in:
Kevin Fenzi 2016-06-25 20:02:06 +00:00
parent ac7673efb8
commit e2f2a0fd52

View file

@ -36,14 +36,14 @@
# shell: chown -R copr-service:copr-service /var/log/copr-dist-git
- name: make sure directories are owned by copr-service user
shell: chown copr-service:copr-service {{ item }}
file: path={{ item }} owner=copr-service group=copr-service
with_items:
- /var/lib/copr-dist-git/
- /var/lib/copr-dist-git/cgit_pkg_list
- /var/log/copr-dist-git
- name: make sure directories are owned by copr-service:packager user
shell: stat -c '%U' /var/lib/dist-git/git | grep copr-service || stat -c '%G' /var/lib/dist-git/git |grep packager || chown -R copr-service:packager /var/lib/dist-git/git
file: path=/var/lib/dist-git/git owner=copr-service group=packager recurse=yes
# set ssh key, so that copr-service could access gitolite
- name: read pub key into var