- name: install python 2.7
yum: name=python27-devel
- name: use python 2.7
shell: ln -sf /usr/bin/python27 /usr/bin/python
- name: install pip
shell: easy_install-2.7 pip
- name: install openjdk
yum: name=java-1.7.0-openjdk
- name: get jenkins
shell: wget http://pkg.jenkins-ci.org/redhat/jenkins-1.614-1.1.noarch.rpm -O jenkins.rpm && rpm -ivh jenkins.rpm
args:
creates: jenkins.rpm
- name: run jenkins
shell: service jenkins restart
- name: create directory for aws credential file
file: path=/var/lib/jenkins/.aws state=directory owner=jenkins group=jenkins mode=0755
- name: copy aws credential file to remote server
copy: src=credentials dest=/var/lib/jenkins/.aws/credentials mode=0755
- name: copy aws config file to remote server
copy: src=config dest=/var/lib/jenkins/.aws/config mode=0755
- name: install eb for jenkins
shell: /usr/local/bin/pip install --upgrade awsebcli
新しめのamazon linuxはpython2.7が最初から動くようなので、最初の3つぐらいはいらないかもしれません。
credentials及びconfigファイルは、ansibleのしかるべき場所(roles/hoge/files)に置いてあります。