Files
fedora-infra_ansible/playbooks/groups/logserver.yml
2020-06-19 12:50:19 -04:00

99 lines
2.4 KiB
YAML

- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=logging"
- name: make the box be real
hosts: logging
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- base
- rkhunter
- nagios_client
- hosts
- fas_client
- apache
- collectd/base
- collectd/server
- sudo
- openvpn/client
- awstats
- web-data-analysis
- role: keytab/service
owner_user: apache
owner_group: apache
service: HTTP
host: "admin.fedoraproject.org"
when: env == "production"
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
tasks:
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
- import_tasks: "{{ tasks_path }}/motd.yml"
#
# We exclude some dirs from restorecon on updates on logservers as they are very large
# and it takes a long long time to run restorecon over them.
#
- name: exclude some directories from selinux relabeling on updates
copy: src="{{ files }}/logserver/fixfiles_exclude_dirs" dest=/etc/selinux/fixfiles_exclude_dirs owner=root mode=0644
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: Cloud Image stats
hosts: log01.iad2.fedoraproject.org
user: root
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- cloudstats
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: dole out the service-specific config
hosts: log01.iad2.fedoraproject.org
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
- role: nfs/client
mnt_dir: '/mnt/fedora_stats'
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,sec=sys,nfsvers=3"
nfs_src_dir: 'fedora_stats'
- geoip
tasks:
- name: install needed packages
package: name={{ item }} state=present
with_items:
- httpd
- httpd-tools
- mod_ssl
- rsync
- emacs-nox
- git
- bc
- gnuplot
- mod_auth_gssapi