Skip to content

Commit

Permalink
fix some bugs and add example to aws ec2
Browse files Browse the repository at this point in the history
  • Loading branch information
infoslack committed Jun 20, 2015
1 parent f5eed76 commit 4c9da38
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
26 changes: 26 additions & 0 deletions ec2-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
- hosts: local
connection: local
gather_facts: False

tasks:
- name: Provision an EC2 node
ec2:
key_name: infoslack
group: ansible
instance_type: t2.micro
image: ami-d05e75b8
ec2_url: ec2.us-east-1.amazonaws.com
region: us-east-1
vpc_subnet_id: subnet-5f698206
wait: yes
count: 1
assign_public_ip: yes
register: ec2

# http://docs.ansible.com/ec2_module.html
# Requirements: boto
# Configure boto or set export:
#
# aws_access_key_id = somekeyid
# aws_secret_access_key = someaccesskey
2 changes: 1 addition & 1 deletion group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ nginx_connections: 1024
nginx_port: 80
nginx_hostname: localhost
nginx_frame_opt: DENY #(DENY | SAMEORIGIN | ALLOW-FROM)
nginx_accept_mutex: on # if worker_processes > 1 change to on
nginx_accept_mutex: 'on' # if worker_processes > 1 change to on

# unicorn config
unicorn_workers: 2
Expand Down
8 changes: 4 additions & 4 deletions roles/postgresql/templates/postgresql.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.

data_directory = '/var/lib/postgresql/9.3/main' # use data in another directory
data_directory = '/var/lib/postgresql/9.4/main' # use data in another directory
# (change requires restart)
hba_file = '/etc/postgresql/9.3/main/pg_hba.conf' # host-based authentication file
hba_file = '/etc/postgresql/9.4/main/pg_hba.conf' # host-based authentication file
# (change requires restart)
ident_file = '/etc/postgresql/9.3/main/pg_ident.conf' # ident configuration file
ident_file = '/etc/postgresql/9.4/main/pg_ident.conf' # ident configuration file
# (change requires restart)

# If external_pid_file is not explicitly set, no extra PID file is written.
external_pid_file = '/var/run/postgresql/9.3-main.pid' # write an extra PID file
external_pid_file = '/var/run/postgresql/9.4-main.pid' # write an extra PID file
# (change requires restart)


Expand Down
2 changes: 1 addition & 1 deletion server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: App Server
hosts: web
sudo: yes
user: root
user: ubuntu
gather_facts: False

roles:
Expand Down

0 comments on commit 4c9da38

Please sign in to comment.