SHARE
TWEET

Untitled

a guest Sep 16th, 2014 1,498 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2. - hosts: bsc-do
  3.   roles:
  4.   - { role: MichaelRigart.newrelic, newrelic_license_key: NOPE, newrelic: '' }
  5.   remote_user: root
  6.   tasks:
  7.   - apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=36A1D7869245C8950F966E92D8576A8BA88D21E9 state=present
  8.   - apt: name=supervisor,lxc-docker,python-pip,nginx,git-core,postgresql,postgresql-contrib
  9.   - pip: name=s3-backups
  10.   - synchronize: src=files/supervisor/conf.d dest=/etc/supervisor/
  11.   - synchronize: src=files/nginx/sites-enabled dest=/etc/nginx/
  12.   - synchronize: src=files/fig dest=/opt/
  13.   - copy: src=files/etc/postgresql/postgresql.conf dest=/etc/postgresql/9.3/main/postgresql.conf
  14.   - copy: src=files/etc/postgresql/pg_hba.conf dest=/etc/postgresql/9.3/main/pg_hba.conf
  15.   - copy: src=files/.bashrc dest=/root/.bashrc
  16.   - copy: src=files/supervisor/supervisord.conf dest=/etc/supervisor/supervisord.conf
  17.   - copy: src=files/etc/update-motd.d/60-bsc dest=/etc/update-motd.d/60-bsc mode=0770
  18.   - cron: name="postgres_backup" user="postgres" job="/usr/local/bin/postgres_to_s3.py --AWS_ACCESS_KEY_ID='NOPE' --AWS_SECRET_ACCESS_KEY='NOPE' --S3_BUCKET_NAME='NOPE' --S3_KEY_NAME=NOPE' --backup --archive" minute=0 hour="*/1"
  19.   - command: dd if=/dev/zero of=/extraswap bs=1M count=1024
  20.     when: ansible_swaptotal_mb < 1
  21.   - command: mkswap /extraswap
  22.     when: ansible_swaptotal_mb < 1
  23.   - action: lineinfile dest=/etc/fstab regexp="extraswap" line="/extraswap none swap sw 0 0" state=present
  24.     when: ansible_swaptotal_mb < 1
  25.   - command: swapon -a
  26.     when: ansible_swaptotal_mb < 1
  27.  
  28.  
  29.   # BSC Website
  30.   - file: path=/opt/staging.burkesoftware.com state=directory
  31.   - shell: git init --bare /opt/staging.burkesoftware.com.git creates=/opt/staging.burkesoftware.com.git
  32.   - copy: src=files/git/staging.burkesoftware.com.git/post-receive dest=/opt/staging.burkesoftware.com.git/hooks/ mode=0770
  33.   - file: path=/opt/burkesoftware.com state=directory
  34.   - shell: git init --bare /opt/burkesoftware.com.git creates=/opt/burkesoftware.com.git
  35.   - copy: src=files/git/burkesoftware.com.git/post-receive dest=/opt/burkesoftware.com.git/hooks/ mode=0770
  36.  
  37.   # Paleo
  38.   - file: path=/opt/staging.muscleuppaleo.com state=directory
  39.   - shell: git init --bare /opt/staging.muscleuppaleo.com.git creates=/opt/staging.muscleuppaleo.com.git
  40.   - copy: src=files/git/staging.muscleuppaleo.com.git/post-receive dest=/opt/staging.muscleuppaleo.com.git/hooks/ mode=0770
  41.   - copy: src=files/etc/ssl/certs/paleo-combined.crt dest=/etc/ssl/certs/
  42.   - copy: src=files/etc/ssl/private/paleo.key dest=/etc/ssl/private/ mode=0640
  43.  
  44.   # Schooldriver
  45.   - file: path=/opt/schooldriver.org state=directory
  46.   - shell: git init --bare /opt/schooldriver.org.git creates=/opt/schooldriver.org.git
  47.   - copy: src=files/git/schooldriver.org.git/post-receive dest=/opt/schooldriver.org.git/hooks/ mode=0770
  48.   - file: path=/opt/staging.schooldriver.org state=directory
  49.   - shell: git init --bare /opt/staging.schooldriver.org.git creates=/opt/staging.schooldriver.org.git
  50.   - copy: src=files/git/staging.schooldriver.org.git/post-receive dest=/opt/staging.schooldriver.org.git/hooks/ mode=0770
  51.   - file: path=/opt/dev.schooldriver.org state=directory
  52.   - shell: git init --bare /opt/dev.schooldriver.org.git creates=/opt/dev.schooldriver.org.git
  53.   - copy: src=files/git/dev.schooldriver.org.git/post-receive dest=/opt/dev.schooldriver.org.git/hooks/ mode=0770
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top