Merge branch 'master' of /git/ansible

This commit is contained in:
Rick Elrod 2015-06-10 09:20:01 +00:00
commit 3be889ef93
21 changed files with 178 additions and 19 deletions

View file

@ -35,4 +35,4 @@ fedmsg_certs:
owner: root
group: masher
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid"
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"

View file

@ -35,4 +35,4 @@ fedmsg_certs:
owner: root
group: masher
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid"
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"

View file

@ -6,4 +6,4 @@ nrpe_procs_warn: 900
nrpe_procs_crit: 1000
# nfs mount options, overrides the all/default
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,actimeo=600"
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,actimeo=600,nfsvers=3"

View file

@ -6,4 +6,4 @@ nrpe_procs_warn: 900
nrpe_procs_crit: 1000
# nfs mount options, overrides the all/default
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,actimeo=600"
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,actimeo=600,nfsvers=3"

View file

@ -27,7 +27,7 @@ fedmsg_certs:
owner: root
group: apache
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid"
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"
virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}

View file

@ -35,4 +35,4 @@ fedmsg_certs:
owner: root
group: masher
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid"
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"

View file

@ -6,7 +6,7 @@ nrpe_procs_warn: 900
nrpe_procs_crit: 1000
# nfs mount options, overrides the all/default
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,actimeo=600"
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,actimeo=600,nfsvers=3"
fas_client_groups: sysadmin-noc,alt-sugar,alt-k12linux,altvideos,hosted-content,mips-content,s390_content,fi-apprentice,qa-deltaisos

View file

@ -24,4 +24,4 @@ fedmsg_certs:
owner: root
group: apache
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid"
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"

View file

@ -24,4 +24,4 @@ fedmsg_certs:
owner: root
group: apache
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid"
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"

View file

@ -4,4 +4,4 @@
#
libdir: /usr/lib
nfs_mount_opts: rw,hard,bg,intr,noatime,nodev,nosuid
nfs_mount_opts: rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3

View file

@ -4,4 +4,4 @@
#
libdir: /usr/lib
nfs_mount_opts: rw,hard,bg,intr,noatime,nodev,nosuid
nfs_mount_opts: rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3

View file

@ -36,4 +36,4 @@ kojipkgs_url: kojipkgs.fedoraproject.org
kojihub_url: koji.fedoraproject.org/kojihub
kojihub_scheme: https
nfs_mount_opts: rw,hard,bg,intr,noatime,nodev,nosuid
nfs_mount_opts: rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3

View file

@ -13,7 +13,7 @@ vmhost: virthost03.phx2.fedoraproject.org
datacenter: phx2
# nfs mount options, overrides the all/default
nfs_mount_opts: "ro,hard,bg,intr,nodev,nosuid"
nfs_mount_opts: "ro,hard,bg,intr,nodev,nosuid,nfsvers=3"
# We define this here to override the global one because we need eth1
virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }}

View file

@ -14,7 +14,7 @@ vmhost: virthost16.phx2.fedoraproject.org
datacenter: phx2
# nfs mount options, overrides the all/default
nfs_mount_opts: "ro,hard,bg,intr,nodev,nosuid"
nfs_mount_opts: "ro,hard,bg,intr,nodev,nosuid,nfsvers=3"
# We define this here to override the global one because we need eth1
virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }}

View file

@ -23,8 +23,8 @@
- sudo
- collectd/base
- { role: nfs/client,
mnt_dir: '/fedora_backups',
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid",
mnt_dir: 'fedora_backups',
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3",
nfs_src_dir: 'fedora_backups' }
- openvpn/client

View file

@ -42,7 +42,7 @@
- git/server
- git/hooks
- clamav
- { role: nfs/client, when: env != "staging", mnt_dir: '/srv/cache/lookaside', nfs_src_dir: 'fedora_sourcecache', nfs_mount_opts='rw,hard,bg,intr,noatime,nodev,nosuid' }
- { role: nfs/client, when: env != "staging", mnt_dir: '/srv/cache/lookaside', nfs_src_dir: 'fedora_sourcecache', nfs_mount_opts='rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3' }
- distgit
tasks:

View file

@ -40,11 +40,11 @@
nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub/archive' }
- { role: nfs/client,
mnt_dir: '/srv/pub/alt',
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid",
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3",
nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub/alt' }
- { role: nfs/client,
mnt_dir: '/srv/pub/fedora-secondary',
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid",
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3",
nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub/fedora-secondary' }
- role: apache

72
roles/mote/tasks/main.yml Normal file
View file

@ -0,0 +1,72 @@
---
# Configuration for the mote webapp
- name: install needed packages
yum: pkg={{ item }} state=present
with_items:
- mote
tags:
- packages
- name: copy sundry mote configuration
template: src={{ item.file }}
dest={{ item.location }}/{{ item.dest }}
owner=apache group=apache mode=0600
with_items:
- { file: mote_config.py, location: /etc/mote, dest: config.py }
- { file: alembic.ini, location: /etc/nuancier, dest: alembic.ini }
changed_when: "1 != 1"
tags:
- config
notify:
- restart apache
- name: create the cache folder where nuancier creates the thumbnails
action: file state=directory
path=/var/cache/nuancier/cache
owner=apache group=apache mode=0700
tags:
- setup
- name: replace the mote configuration file by the one with the normal user
template: src={{ item.file }}
dest="{{ item.location }}/{{ item.file }}"
owner=apache group=apache mode=0600
changed_when: "1 != 1"
with_items:
- { file: mote_config.py, location: /etc/mote, dest: config.py }
- { file: mote.conf, location: /etc/httpd/conf.d }
- { file: mote.wsgi, location: /usr/share/mote }
tags:
- config
notify:
- restart apache
- restart memcached
- name: set sebooleans so nuancier can talk to the db
action: seboolean name=httpd_can_network_connect_db
state=true
persistent=true
- name: apply selinux type to static files
file: >
dest=/usr/lib/python2.7/site-packages/mote/static/
setype=httpd_sys_content_t
state=directory
recurse=yes
- name: apply selinux type to meetbot files
file: >
dest=/srv/web/meetbot/
setype=httpd_sys_content_t
state=directory
recurse=yes
- name: set sebooleans so apache can use memcached
action: seboolean name=httpd_can_network_memcache
state=true
persistent=true
- name: apply selinux type to the wsgi file
file: >
dest=/usr/share/mote/mote.wsgi
setype=httpd_sys_content_t

View file

@ -0,0 +1,24 @@
# Apache configuration file for mote
Alias /static /usr/lib/python2.7/site-packages/mote/static
WSGIDaemonProcess mote user=apache maximum-requests=1000 display-name=mote processes=2 threads=1
WSGISocketPrefix run/wsgi
WSGIRestrictStdout On
WSGIRestrictSignal Off
WSGIPythonOptimize 1
WSGIScriptAlias / /usr/share/mote/mote.wsgi
<Location />
WSGIProcessGroup mote
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Location>

View file

@ -0,0 +1,24 @@
#-*- coding: utf-8 -*-
# The three lines below are required to run on EL6 as EL6 has
# two possible version of python-sqlalchemy and python-jinja2
# These lines make sure the application uses the correct version.
import __main__
__main__.__requires__ = ['jinja2 >= 2.4']
import pkg_resources
import os
#Set the environment variable pointing to the configuration file
os.environ['MOTE_CONFIG_FOLDER'] = '/etc/mote/'
# The following is only needed if you did not install mote
# as a python module (for example if you run it from a git clone).
# import sys
# sys.path.insert(0, '/path/to/mote/')
# The most import line to make the wsgi working
from mote import app as application
from mote import soke
# Generate cache and store in memcached
soke.run()

View file

@ -0,0 +1,39 @@
'''
Crawler Configuration
'''
log_endpoint = "/srv/web/meetbot"
#log_endpoint = "/home/user/mote/test_data/meetbot"
# Fedora has a "teams" folder which contains
# logs from meetings started with a certain team name
# for instance, `#startmeeting famna` will save in "/teams/famna"
# Folders not in "teams" reflect the channel name of the meeting
log_team_folder = "teams"
# Directories to ignore in crawling the logs.
# These folders are ignored. The "meetbot" folder is
# an infinite loop on Fedora's meetbot instance.
ignore_dir = "meetbot"
# Location where raw logs/minutes are stored (remote location)
meetbot_prefix = "http://meetbot.fedoraproject.org"
# Time (in seconds) after which the log/meeting cache expires
cache_expire_time = 60 * 60 * 1
'''
Development Configuration
'''
enable_debug = True
app_port = 5000
'''
General Configuration
'''
app_host = "127.0.0.1"
admin_groups = ["sysadmin-mote"]
memcached_ip = "127.0.0.1:11211"