Commit e6990e86 by Will Daly

Use ansible modules for installing apt packages

Move vars/main.yml to defaults/main.yml
Move jenkins worker debian packages list to a variable.
parent 2d9bf421
......@@ -13,17 +13,14 @@
- name: jenkins | Add the jenkins user to the group
user: name={{ jenkins_user }} append=yes groups={{ jenkins_group }}
- name: jenkins | Install Jenkins
shell: wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
- name: jenkins | Install Jenkins apt key
apt_key: url=http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key state=present
- name: jenkins | Install Jenkins 2
shell: sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
- name: jenkins | Add apt repository
apt_repository: repo='deb http://pkg.jenkins-ci.org/debian binary/' state=present
- name: jenkins | Install Jenkins 3
shell: apt-get update
- name: jenkins | Install jenkins 4
apt: pkg=jenkins state=present
- name: jenkins | Install jenkins package
apt: pkg=jenkins state=present update_cache=yes
- name: jenkins | Make plugins directory
sudo_user: jenkins
......
......@@ -7,6 +7,30 @@ jenkins_user: "jenkins"
jenkins_group: "jenkins"
jenkins_user_home: /home/jenkins
# System packages
jenkins_debian_pkgs:
- ack-grep
- build-essential
- git
- gfortran
- graphviz
- lynx-cur
- libgraphviz-dev
- libopenblas-dev
- liblapack-dev
- libxml2-dev
- libgeos-dev
- libmysqlclient-dev
- libxslt1-dev
- mongodb
- npm
- pkg-config
- python2.7
- python-pip
- python2.7-dev
- unzip
- xml-twig-tools
# Ruby Specific Vars
rbenv_root: "{{ jenkins_user_home }}/.rbenv"
ruby_version: "1.9.3-p374"
......
......@@ -32,29 +32,8 @@
mode=400
- name: jenkins | Install system packages
apt: pkg=${item} update_cache=yes state=present
with_items:
- ack-grep
- build-essential
- git
- gfortran
- graphviz
- lynx-cur
- libgraphviz-dev
- libopenblas-dev
- liblapack-dev
- libxml2-dev
- libgeos-dev
- libmysqlclient-dev
- libxslt1-dev
- mongodb
- npm
- pkg-config
- python2.7
- python-pip
- python2.7-dev
- unzip
- xml-twig-tools
apt: pkg={{','.join(jenkins_debian_pkgs)}}
state=present update_cache=yes
- name: jenkins | Add script to set up environment variables
template: src=jenkins_env.sh.j2 dest=/usr/local/bin/jenkins_env.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment