Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: bsc-do
- roles:
- - { role: MichaelRigart.newrelic, newrelic_license_key: NOPE, newrelic: '' }
- remote_user: root
- tasks:
- - apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=36A1D7869245C8950F966E92D8576A8BA88D21E9 state=present
- - apt: name=supervisor,lxc-docker,python-pip,nginx,git-core,postgresql,postgresql-contrib
- - pip: name=s3-backups
- - synchronize: src=files/supervisor/conf.d dest=/etc/supervisor/
- - synchronize: src=files/nginx/sites-enabled dest=/etc/nginx/
- - synchronize: src=files/fig dest=/opt/
- - copy: src=files/etc/postgresql/postgresql.conf dest=/etc/postgresql/9.3/main/postgresql.conf
- - copy: src=files/etc/postgresql/pg_hba.conf dest=/etc/postgresql/9.3/main/pg_hba.conf
- - copy: src=files/.bashrc dest=/root/.bashrc
- - copy: src=files/supervisor/supervisord.conf dest=/etc/supervisor/supervisord.conf
- - copy: src=files/etc/update-motd.d/60-bsc dest=/etc/update-motd.d/60-bsc mode=0770
- - 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"
- - command: dd if=/dev/zero of=/extraswap bs=1M count=1024
- when: ansible_swaptotal_mb < 1
- - command: mkswap /extraswap
- when: ansible_swaptotal_mb < 1
- - action: lineinfile dest=/etc/fstab regexp="extraswap" line="/extraswap none swap sw 0 0" state=present
- when: ansible_swaptotal_mb < 1
- - command: swapon -a
- when: ansible_swaptotal_mb < 1
- # BSC Website
- - file: path=/opt/staging.burkesoftware.com state=directory
- - shell: git init --bare /opt/staging.burkesoftware.com.git creates=/opt/staging.burkesoftware.com.git
- - copy: src=files/git/staging.burkesoftware.com.git/post-receive dest=/opt/staging.burkesoftware.com.git/hooks/ mode=0770
- - file: path=/opt/burkesoftware.com state=directory
- - shell: git init --bare /opt/burkesoftware.com.git creates=/opt/burkesoftware.com.git
- - copy: src=files/git/burkesoftware.com.git/post-receive dest=/opt/burkesoftware.com.git/hooks/ mode=0770
- # Paleo
- - file: path=/opt/staging.muscleuppaleo.com state=directory
- - shell: git init --bare /opt/staging.muscleuppaleo.com.git creates=/opt/staging.muscleuppaleo.com.git
- - copy: src=files/git/staging.muscleuppaleo.com.git/post-receive dest=/opt/staging.muscleuppaleo.com.git/hooks/ mode=0770
- - copy: src=files/etc/ssl/certs/paleo-combined.crt dest=/etc/ssl/certs/
- - copy: src=files/etc/ssl/private/paleo.key dest=/etc/ssl/private/ mode=0640
- # Schooldriver
- - file: path=/opt/schooldriver.org state=directory
- - shell: git init --bare /opt/schooldriver.org.git creates=/opt/schooldriver.org.git
- - copy: src=files/git/schooldriver.org.git/post-receive dest=/opt/schooldriver.org.git/hooks/ mode=0770
- - file: path=/opt/staging.schooldriver.org state=directory
- - shell: git init --bare /opt/staging.schooldriver.org.git creates=/opt/staging.schooldriver.org.git
- - copy: src=files/git/staging.schooldriver.org.git/post-receive dest=/opt/staging.schooldriver.org.git/hooks/ mode=0770
- - file: path=/opt/dev.schooldriver.org state=directory
- - shell: git init --bare /opt/dev.schooldriver.org.git creates=/opt/dev.schooldriver.org.git
- - copy: src=files/git/dev.schooldriver.org.git/post-receive dest=/opt/dev.schooldriver.org.git/hooks/ mode=0770
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement