Merge branch 'master' of /git/ansible

This commit is contained in:
Patrick Uiterwijk 2014-06-23 18:27:50 +00:00
commit 0375c66a20
114 changed files with 117 additions and 65 deletions

View file

@ -0,0 +1,40 @@
import time
class CallbackModule(object):
"""
A plugin for timing tasks
"""
def __init__(self):
self.stats = {}
self.current = None
def playbook_on_task_start(self, name, is_conditional):
"""
Logs the start of each task
"""
if self.current is not None:
# Record the running time of the last executed task
self.stats[self.current] = time.time() - self.stats[self.current]
# Record the start time of the current task
self.current = name
self.stats[self.current] = time.time()
def playbook_on_stats(self, stats):
"""
Prints the timings
"""
# Record the timing of the very last task
if self.current is not None:
self.stats[self.current] = time.time() - self.stats[self.current]
# Sort the tasks by their running time
results = sorted(self.stats.items(), key=lambda value: value[1], reverse=True)
# Just keep the top 10
results = results[:10]
# Print the timings
for name, elapsed in results:
print "{0:-<70}{1:->9}".format('{0} '.format(name), ' {0:.02f}s'.format(elapsed))

View file

@ -1,3 +1,4 @@
#jinja2:variable_start_string:'[%' , variable_end_string:'%]'
---
- name: check/create instance
hosts: localhost
@ -9,7 +10,7 @@
- OS_AUTH_URL: http://172.23.0.2:5000/v2.0
- OS_TENANT_NAME: copr
- OS_USERNAME: msuchy
- OS_PASSWORD: {{ copr_nova_password }}
- OS_PASSWORD: [% copr_nova_password %]
# rhel 6.4 2013-02-21 x86_64 - ami
- image_id: cba0c766-84ac-4048-b0f5-6d4000af62f8

View file

@ -1,3 +1,4 @@
#jinja2:variable_start_string:'[%' , variable_end_string:'%]'
---
- name: terminate instance
hosts: all
@ -8,7 +9,7 @@
- OS_AUTH_URL: http://172.23.0.2:5000/v2.0
- OS_TENANT_NAME: copr
- OS_USERNAME: msuchy
- OS_PASSWORD: {{ copr_nova_password }}
- OS_PASSWORD: [% copr_nova_password %]
tasks:
- name: terminate it

View file

@ -1,3 +1,3 @@
# branched compose
MAILTO=rel-eng@lists.fedoraproject.org
MAILTO=releng-cron@lists.fedoraproject.org
15 7 * * * masher TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && cd $TMPDIR && git clone -n git://git.fedorahosted.org/releng && cd releng && git checkout -b stable rawhide-stable && LANG=en_US.UTF-8 ./scripts/buildbranched $(date "+\%Y\%m\%d") && sudo -u ftpsync /usr/local/bin/update-fullfilelist fedora

View file

@ -1,3 +1,3 @@
# rawhide compose
MAILTO=rel-eng@lists.fedoraproject.org
MAILTO=releng-cron@lists.fedoraproject.org
15 5 * * * masher TMPDIR=`mktemp -d /tmp/rawhide.XXXXXX` && cd $TMPDIR && git clone -n git://git.fedorahosted.org/releng && cd releng && git checkout -b stable rawhide-stable && LANG=en_US.UTF-8 ./scripts/buildrawhide $(date "+\%Y\%m\%d") && sudo -u ftpsync /usr/local/bin/update-fullfilelist fedora

View file

@ -100,3 +100,6 @@
- name: restart supervisord
service: name=supervisord state=restarted
- name: run rkhunter
command: rkhunter --propupd

View file

@ -34,7 +34,7 @@ lvm_size: 20000
# gateway={{ gw }} dns={{ dns }} console=tty0 console=ttyS0
# hostname={{ inventory_hostname }}"
# --network=bridge=br0 --autostart --noautoconsole
virt_install_command: /usr/sbin/virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
--vcpus={{ num_cpus }} -l {{ ks_repo }} -x
"ksdevice=eth0 ks={{ ks_url }} console=tty0 console=ttyS0

View file

@ -3,8 +3,8 @@ nm: 255.255.255.0
gw: 10.5.126.254
dns: 10.5.126.21
volgroup: /dev/vg_virthost16
vmhost: virthost16.phx2.fedoraproject.org
volgroup: /dev/vg_virthost
vmhost: virthost18.phx2.fedoraproject.org
datacenter: phx2
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7

View file

@ -15,12 +15,12 @@
- base
- rkhunter
- denyhosts
- hosts
- fas_client
- sudo
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -15,12 +15,12 @@
- base
- rkhunter
- denyhosts
- hosts
- fas_client
- sudo
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -13,6 +13,7 @@
roles:
- base
- hosts
- fas_client
- rkhunter
- denyhosts
@ -21,7 +22,6 @@
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"
- include: "{{ tasks }}/common_scripts.yml"

View file

@ -13,6 +13,7 @@
roles:
- base
- hosts
- fas_client
- rkhunter
- denyhosts
@ -21,7 +22,6 @@
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"
- include: "{{ tasks }}/common_scripts.yml"

View file

@ -32,6 +32,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- ask
@ -40,7 +41,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -14,11 +14,11 @@
roles:
- base
- hosts
- fas_client
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,13 +36,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- autosigner
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -19,11 +19,11 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,13 +36,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- fedmsg/base
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,6 +36,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- badges/frontend
@ -44,7 +45,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -33,13 +33,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- sudo
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -30,6 +30,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- { role: bodhi/base, when: "inventory_hostname.startswith('bodhi01') or inventory_hostname.startswith('bodhi02')" }
@ -40,7 +41,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -35,13 +35,13 @@
- rkhunter
# - denyhosts
- nagios_client
- hosts
- fas_client
- sudo
- collectd/base
- fedmsg/base
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -17,10 +17,10 @@
- { role: nfs/client, when: inventory_hostname.startswith('build') , mnt_dir: '/mnt/fedora_koji', nfs_src_dir: 'fedora_koji' }
- koji_builder
- { role: bkernel, when: inventory_hostname.startswith('bkernel') }
- hosts
tasks:
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/hosts.yml"
handlers:
- include: "{{ handlers }}/restart_services.yml"

View file

@ -33,12 +33,12 @@
roles:
- base
- hosts
- { role: nfs/client, when: not inventory_hostname.startswith('arm'), mnt_dir: '/mnt/fedora_koji', nfs_src_dir: 'fedora_koji' }
- { role: nfs/client, when: datacenter == 'staging', mnt_dir: '/mnt/koji', nfs_src_dir: '/mnt/koji' }
- koji_builder
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- name: make sure kojid is running

View file

@ -31,6 +31,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- yum-cron
@ -38,7 +39,6 @@
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -51,6 +51,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- download
@ -61,7 +62,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -31,12 +31,12 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- rsyncd
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,12 +36,12 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- rsyncd
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,12 +36,12 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- rsyncd
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,12 +36,12 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- fedmsg/base
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,13 +36,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- rsyncd
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,13 +36,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- rsyncd
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,13 +36,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- fedmsg/base
- keyserver
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/openvpn_client.yml"

View file

@ -35,6 +35,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- fedmsg/base
@ -44,7 +45,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -29,12 +29,12 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- ansible-server
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,6 +36,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- yum-cron
@ -43,7 +44,6 @@
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -37,6 +37,7 @@
- denyhosts
- nagios_client
- geoip
- hosts
- fas_client
- collectd/base
- mirrorlist
@ -44,7 +45,6 @@
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/openvpn_client.yml"

View file

@ -36,13 +36,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- fedmsg/base
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,6 +36,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- fedmsg/base
@ -43,7 +44,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,12 +36,12 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,13 +36,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- rsyncd
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -32,6 +32,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- paste
@ -39,7 +40,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,12 +36,12 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -37,6 +37,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- postgresql_server
- collectd/base
@ -44,7 +45,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -37,11 +37,11 @@
- base
- nagios_client
- collectd/base
- hosts
- fedmsg/base
tasks:
- include: "{{ tasks }}/koji/releng_config.yml"
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/motd.yml"
handlers:

View file

@ -35,6 +35,7 @@
- { role: base, tags:['base'] }
- { role: rkhunter, tags:['rkhunter'] }
- { role: nagios_client, tags:['nagios_client'] }
- hosts
- { role: fas_client, tags:['fas_client'] }
- { role: collectd/base, tags:['collectd_base'] }
- { role: yum-cron, tags:['yumcron'] }
@ -44,7 +45,6 @@
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -32,12 +32,12 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -37,11 +37,11 @@
- denyhosts
- nagios_client
- collectd/base
- hosts
- fas_client
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,6 +36,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- geoip
@ -52,7 +53,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -37,13 +37,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- rsyncd
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -34,6 +34,7 @@
- base
- rkhunter
- nagios_client
- hosts
- fas_client
- collectd/base
- yum-cron
@ -41,7 +42,6 @@
tasks:
# this is how you include other task lists
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -32,13 +32,13 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- unbound
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -32,6 +32,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- fedmsg/base
@ -42,7 +43,6 @@
process: fedmsg-irc
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -18,13 +18,13 @@
- rkhunter
# - denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- { role: iscsi_client, when: datacenter == "phx2" }
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -36,6 +36,7 @@
- rkhunter
- denyhosts
- nagios_client
- hosts
- fas_client
- collectd/base
- fedmsg/base
@ -45,7 +46,6 @@
- sudo
tasks:
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"

View file

@ -24,11 +24,11 @@
roles:
- sudo
- hosts
tasks:
- include: "{{ tasks }}/cloud_setup_basic.yml"
- include: "{{ tasks }}/postfix_basic.yml"
- include: "{{ tasks }}/hosts.yml"
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/motd.yml"
- include: "{{ tasks }}/apache.yml"

View file

@ -118,7 +118,6 @@
with_first_found:
- rsyslog/rsyslog.conf.{{ dist_tag }}
- rsyslog/rsyslog.conf.default
notify:
- restart rsyslog
tags:

View file

@ -68,3 +68,8 @@
copy: src=fas-client.cron dest=/etc/cron.d/fas-client owner=root mode=644
tags:
- config
- name: run fas_client only if we just installed
command: fasClient -if creates=/var/db/shadow.db
tags:
- config

Some files were not shown because too many files have changed in this diff Show more