ansible/roles/mirrormanager/mirrorlist2/tasks/main.yml
Patrick Uiterwijk 1fa921824b Correct type mirrorlist socket
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2015-01-29 21:16:58 +00:00

48 lines
1.4 KiB
YAML

---
# tasklist for setting up the mirrorlist app components
# create mirrormanager user
# create mirrormanager user
- name: add mirrormanager user - uid {{ mirrormanager_uid }}
user: name=mirrormanager uid={{ mirrormanager_uid }} state=present home=/home/mirrormanager createhome=yes
tags:
- mirrorlist2
- name: make a /var/lib/mirrormanager dir for data
file: dest=/var/lib/mirrormanager/ state=directory owner=mirrormanager group=mirrormanager mode=0755
tags:
- mirrorlist2
- name: install packages for mirrorlist
yum: pkg={{ item }} state=present enablerepo=epel-testing
with_items:
- mirrormanager2-mirrorlist
- python-IPy
tags:
- packages
- mirrorlist2
- name: make sure mirrorlist-server is enabled (but not started yet in case we do not have pkl)
service: name=mirrorlist-server enabled=yes
tags:
- mirrorlist2
# install mirrorlist-server.conf apache config
- name: mirrorlist-server apache conf
template: src=mirrorlist-server.conf dest=/etc/httpd/conf.d/mirrorlist-server.conf
notify:
- restart apache
tags:
- config
- mirrorlist2
# mirrormanager user ssh key(s)
- name: add authorized_keys for mirrormanager
authorized_key: key="{{ item }}" user=mirrormanager state=present
with_file:
- mm-authorized_key
tags:
- mirrorlist2
- name: /var/run/mirrormanager/mirrorlist_server.sock file context
command: semanage fcontext -a -t httpd_var_run_t /var/run/mirrormanager/mirrorlist_server.sock