Commit c2eb3360 authored by CHRISTOPHER PIKE's avatar CHRISTOPHER PIKE

Merge branch 'develop' of git.psu.edu:ais-swe/infrastructure into develop

parents 408f2b92 cdd506f5
Instructions for setting up Vagrant/Ansible on a new machine Instructions for setting up Vagrant/Ansible on a new machine
Install Virtual Box Install Virtual Box
go to https://www.virtualbox.org/wiki/Linux_Downloads - go to https://www.virtualbox.org/wiki/Linux_Downloads
Click on the appropriate version to install - Click on the appropriate version to install
Select open with package manager - Select open with package manager
Get the OS for Virtual Box Get the OS for Virtual Box
vagrant box add precise32 http://files.vagrantup.com/precise32.box - vagrant box add precise32 http://files.vagrantup.com/precise32.box
vagrant box add centos-6.4-32 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-i386-v20130427.box - vagrant box add centos-6.4-32 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-i386-v20130427.box
- vagrant box add centos-6.7-64 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.7-x86_64-v20151108.box
Install AnsibleDirections from http://docs.ansible.com/intro_installation.html#latest-releases-via-apt-ubuntu Install AnsibleDirections from http://docs.ansible.com/intro_installation.html#latest-releases-via-apt-ubuntu
sudo apt-get install software-properties-common - sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansiblesudo - sudo apt-add-repository ppa:ansible/ansiblesudo
apt-get updatesudo - apt-get updatesudo
apt-get install ansible - apt-get install ansible
Vagrant repo setup Vagrant repo setup
git submodule init - git submodule init
git submodule update - git submodule update
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
become: true become: true
become_user: postgres become_user: postgres
- name: create password file on vagrant box - name: create password file on vagrant box for postgres user
become: true
become_user: postgres
lineinfile: lineinfile:
dest: ~/.pgpass dest: ~/.pgpass
state: present state: present
...@@ -22,3 +24,29 @@ ...@@ -22,3 +24,29 @@
with_items: with_items:
- "#hostname:port:database:username:password" - "#hostname:port:database:username:password"
- "localhost:5432:{{ db_name }}:{{ db_user }}:{{ db_user_pw }}" - "localhost:5432:{{ db_name }}:{{ db_user }}:{{ db_user_pw }}"
- name: create password file on vagrant box for vagrant user
become: true
become_user: vagrant
lineinfile:
dest: ~/.pgpass
state: present
create: yes
line: "{{ item }}"
mode: 0600
with_items:
- "#hostname:port:database:username:password"
- "localhost:5432:{{ db_name }}:{{ db_user }}:{{ db_user_pw }}"
- name: create password file on vagrant box for root user
become: true
become_user: root
lineinfile:
dest: ~/.pgpass
state: present
create: yes
line: "{{ item }}"
mode: 0600
with_items:
- "#hostname:port:database:username:password"
- "localhost:5432:{{ db_name }}:{{ db_user }}:{{ db_user_pw }}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment