Skip to content

Instantly share code, notes, and snippets.

@josephtate
Last active January 29, 2016 19:13
Show Gist options
  • Save josephtate/505a4edbd0d051721d61 to your computer and use it in GitHub Desktop.
Save josephtate/505a4edbd0d051721d61 to your computer and use it in GitHub Desktop.
- name: ubuntu ssh keys
include: ssh.yml ssh_user=ubuntu
#locale needed as of 2013/12/17
- name: Install python-software-properties and locale
apt: state=present pkg=python-software-properties,language-pack-en update_cache=yes
tags: deploy
- name: Enable crunch.io ppa
apt_repository: state={{'present' if ansible_distribution_release=='precise' else 'absent'}} repo="ppa:crunch.io/public-{{ppa_repo}}"
tags: deploy
- name: Enable chris-lea's libjemalloc (redis) ppa
apt_repository: state=present repo=ppa:chris-lea/redis-server
tags: [update, deploy, malloc]
- name: Install libjemalloc1
apt: state=latest pkg=libjemalloc1
tags: [deploy, malloc]
- name: Remove debsrc for backports
apt_repository: state=absent repo="deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse" update-cache=false
- name: Enable multiverse
apt_repository: state=present repo='deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse'
tags: deploy
#Remove it if it was installed on vagrant or something
- name: Remove datadog-agent if not monitoring
apt: state=absent pkg=datadog-agent
when: not ddog_monitoring
- name: Upgrade all the packages on the system
apt: upgrade=dist update_cache=yes cache_valid_time=1200
tags: [update, deploy]
- name: Install common packages and utilities
apt: state=latest pkg=s3cmd,vim,git,ec2-api-tools,duplicity,python-boto,moreutils,unzip,python-software-properties,curl,ntp
tags: deploy
notify: ntp started
- name: Increase system file limit
sysctl: state=present reload=yes name=fs.file-max value=1000000
tags: [sysctl,deploy,update]
- name: Increase ulimit file limits
lineinfile: state=present dest=/etc/security/limits.conf regexp='crunchapp.*' line='crunchapp - nofile unlimited' insertbefore='.*End of file'
tags: [sysctl,deploy,update]
- name: Set default editor to vim
alternatives: name=editor path=/usr/bin/vim.basic
tags: [deploy,update]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment