first commit to the ansible public repo

This commit is contained in:
Seth Vidal 2012-10-08 19:35:54 +00:00
commit a605ca0f15
21 changed files with 635 additions and 0 deletions

34
tasks/cloud_setup_el6.yml Normal file
View file

@ -0,0 +1,34 @@
---
- name: put repos on system
action: copy src=$files/common/$item dest=/etc/yum.repos.d/$item
with_items:
- epel6.repo
- rhel6.repo
tags:
- config
- name: update all
action: command yum -y update
tags:
- packages
- name: ntpdate install
action: yum state=installed pkg=ntpdate
tags:
- packages
- name: sync time - just once
action: command /usr/sbin/ntpdate -s -b 66.187.233.4
- name: edit hostname to be instance name
action: shell hostname `curl -s http://169.254.169.254/latest/meta-data/instance-id`
tags:
- config
- name: put sysadmin-main in place for sshing in
action: copy src=$files/common/sysadmin-main dest=/root/.ssh/authorized_keys mode=600 backup=true
tags:
- config
- name: put /dev/vda2 up as /mnt
action: mount name=/mnt src=/dev/vda2 fstype=ext3 passno=1 dump=1 state=mounted

65
tasks/jenkins_slave.yml Normal file
View file

@ -0,0 +1,65 @@
# setup jenkins slave
---
- name: install pkgs for jenkins
action: yum state=installed pkg=$item
with_items:
- vim
- java-1.7.0-openjdk
- subversion
- bzr
- git
- rpmlint
- mercurial
- mock
- python-bugzilla
- python-straight-plugin
- python-pip
- python-virtualenv
- python-coverage
- pylint
- python-argparse
- python-nose
- python-BeautifulSoup
- python-fedora
tags:
- packages
- name: install pkgs for jenkins for fedora systems
action: yum state=installed pkg=$item
only_if: '$is_fedora'
with_items:
- python3
- python-nose-cover3
- python3-nose-cover3
tags:
- packages
- name: set the hostname to jenkins-osversion
action: command hostname jenkins-${dist_tag}
tags:
- config
- name: setup jenkins_slave user
action: user name=jenkins_slave state=present createhome=yes system=no password=$jenkins_slave_pw
- name: jenkins_slave to mock group
action: user name=jenkins_slave groups=mock
- name: add .gitconfig for jenkins_slave user
action: template src=$files/jenkins/gitconfig dest=/home/jenkins_slave/.gitconfig owner=jenkins_slave group=jenkins_slave mode=664
tags:
- config
- name: template sshd_config
action: template src=$item dest=/etc/ssh/sshd_config mode=0600 owner=root group=root
first_available_file:
- $files/jenkins/sshd_config_slave.$ansible_distribution
- $files/jenkins/sshd_config_slave
notify:
- restart sshd
tags:
- config
- name: mkdir dir for jenkins data
action: file state=directory path=/mnt/jenkins owner=jenkins_slave group=jenkins_slave