This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: production | |
| sudo: yes | |
| tasks: | |
| - name: add domain to hosts file | |
| template: src=templates/hosts.j2 dest=/etc/hosts | |
| - name: ensure apt cache is up to date | |
| apt: update_cache=yes | |
| - name: Install All The Packages! | |
| apt: pkg={{item}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Minecraft Server Ansible Playbook | |
| # | |
| # Author:: Pol Llovet (<[email protected]>) | |
| # Copyright 2013, Montana State University | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TASK: [add RCG users as sudoers] ********************************************** | |
| <voeis-dev.rcg.montana.edu> ESTABLISH CONNECTION FOR USER: pol on PORT 22 TO voeis-dev.rcg.montana.edu | |
| <voeis-dev.rcg.montana.edu> EXEC /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1366999176.44-9546560642247 && chmod a+rx $HOME/.ansible/tmp/ansible-1366999176.44-9546560642247 && echo $HOME/.ansible/tmp/ansible-1366999176.44-9546560642247' | |
| <voeis-dev.rcg.montana.edu> REMOTE_MODULE user name="pol" group="users" comment="Pol Llovet" password="----SNIP----" uid="31382" shell="/bin/zsh" home="/home/pol" | |
| <voeis-dev.rcg.montana.edu> PUT /var/folders/lg/_rds9m6n12l5gkn5xgl6kpsm0000gn/T/tmpK1RZcZ TO /home/pol/.ansible/tmp/ansible-1366999176.44-9546560642247/user | |
| <voeis-dev.rcg.montana.edu> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=yyfrjqioelymraextrpmhwmpufqoijpl] password: " -u root /bin/sh -c '"'"'/usr/bin/python /home/pol/.ansible/tmp/ansible-1366999176.44-9546560642247/user'"'"'' | |
| changed: [voeis-dev.rcg.mont |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [base] | |
| host1 | |
| host2 | |
| host3 | |
| [base:vars] | |
| ansible_ssh_user=admin | |
| [legacy] | |
| host1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| getstats="/usr/share/cacti/site/scripts/getd2lstats.pl" | |
| logfile="/var/log/syslog" | |
| grep slapd /var/log/syslog | perl ${getstats} | sort | uniq -c | xargs | while read a b c d; do printf "$b:$a $d:$c"; done; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template "#{node[:redmine][:root]}/current/config/configuration.yml" do | |
| source "configuration.yml.erb" | |
| owner "rails" | |
| group "users" | |
| mode "0755" | |
| notifies :restart, resources(:service => "apache2") | |
| variables( | |
| :default => node[:redmine][:config][:default], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <VirtualHost *:80> | |
| ServerAdmin [email protected] | |
| ServerName forge.rcg.montana.edu | |
| #Force redirection to SSL Forge site | |
| RewriteEngine On | |
| RewriteCond %{HTTPS} off | |
| RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} | |
| </VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +------------------------------------------------------------------------------+ | |
| [2012-07-22 19:44:31.173858] I [rpc-clnt.c:1536:rpc_clnt_reconfig] 0-store-client-1: changing port to 24009 (from 0) | |
| [2012-07-22 19:44:31.174011] I [rpc-clnt.c:1536:rpc_clnt_reconfig] 0-store-client-0: changing port to 24013 (from 0) | |
| [2012-07-22 19:44:35.116989] I [client-handshake.c:1090:select_server_supported_programs] 0-store-client-1: Using Program GlusterFS 3.2.5, Num (1298437), Version (310) | |
| [2012-07-22 19:44:35.117232] I [client-handshake.c:913:client_setvolume_cbk] 0-store-client-1: Connected to 153.90.203.11:24009, attached to remote volume '/mnt/live'. | |
| [2012-07-22 19:44:35.117261] I [afr-common.c:3141:afr_notify] 0-store-replicate-0: Subvolume 'store-client-1' came back up; going online. | |
| [2012-07-22 19:44:35.117552] I [client-handshake.c:1090:select_server_supported_programs] 0-store-client-0: Using Program GlusterFS 3.2.5, Num (1298437), Version (310) | |
| [2012-07-22 19:44:35.117900] I [client-handshake.c:913:client_setvo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ubag = node[:uberuser][:userdatabag] | |
| gbag = node[:uberuser][:groupdatabag] | |
| rails_user = data_bag_item(ubag, 'rails') | |
| # Add the current developer ssh keys to the rails uberuser authkeys | |
| developers = data_bag_item(gbag, 'developers')['users'] | |
| log("@@rails_rcg:default developers: #{developers.inspect}") { level :debug } | |
| ssh_keys = developers.map{|d| data_bag_item(ubag, d)['ssh-keys'] }.flatten.compact |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(d) { | |
| var dl = d.createElement('a'); | |
| dl.innerText = 'Download MP3'; | |
| dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; | |
| dl.download = d.querySelector('em').innerText+".mp3"; | |
| d.querySelector('.primary').appendChild(dl); | |
| dl.style.marginLeft = '10px'; | |
| dl.style.color = 'red'; | |
| dl.style.fontWeight = 700; | |
| })(document); |