PHP Classes

File: ansible/

Recommend this page to a friend!
  Classes of Omar Shaban  >  PHP Game of Three  >  ansible/  >  Download  
File: ansible/
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Game of Three
Game of Three implementation using Websockets
Author: By
Last change:
Date: 1 year ago
Size: 928 bytes


Class file image Download
#!/usr/bin/env bash

# Update Repositories
sudo apt-get update

# Determine Ubuntu Version
. /etc/lsb-release

# Decide on package to install for `add-apt-repository` command
# USE_COMMON=1 when using a distribution over 12.04
# USE_COMMON=0 when using a distribution at 12.04 or older
USE_COMMON=$(echo "$DISTRIB_RELEASE > 12.04" | bc)

if [ "$USE_COMMON" -eq "1" ];
    sudo apt-get install -y software-properties-common
    sudo apt-get install -y python-software-properties

# Add Ansible Repository & Install Ansible
sudo add-apt-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y ansible

# Setup Ansible for Local Use and Run
cp /vagrant/ansible/inventories/dev /etc/ansible/hosts -f
chmod 666 /etc/ansible/hosts
cat /vagrant/ansible/files/authorized_keys >> /home/vagrant/.ssh/authorized_keys
sudo ansible-playbook /vagrant/ansible/playbook.yml -e hostname=$1 --connection=local
For more information send a message to info at phpclasses dot org.