Skip to content

Instantly share code, notes, and snippets.

@Alan01252
Created November 7, 2014 13:26
Show Gist options
  • Save Alan01252/87b896593f387ca81264 to your computer and use it in GitHub Desktop.
Save Alan01252/87b896593f387ca81264 to your computer and use it in GitHub Desktop.
---
- hosts: all
sudo: false
vars:
ngnix_server_the_farming_forum:
enabled: True
default: True
name: [ "thefarmingforum.co.uk" ]
options: |
if ($host = 'www.thefarmingforum.co.uk' ) {
rewrite ^/(.*)$ http://thefarmingforum.co.uk/$1 permanent;
}
location: |
'/':
try_files $uri $uri/ /index.php?$uri&$args;
index index.php index.html;
'/internal_data/': |
internal;
'library': |
internal;
'~ \.php $': |
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
location_referers:
'/': [www.thefarmingforum.co.uk]
pre_tasks:
- name: ensure IP address of the ansibler controller is set
set_fact:
ansible_controller: '{{ ansible_env.SSH_CLIENT.split(" ") | first}}/32'
roles:
- { role: debops.ferm,
ferm: true,
sudo: yes
}
- { role: debops.php5,
php5_post_max_size: '16M',
php5_upload_max_filesize: '16M',
sudo: yes
}
- { role: debops.nginx,
nginx_servers: ['nginx_server_the_farming_forum'],
sudo: yes
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment