template role

nginx role
jenkins clean install working
This commit is contained in:
2015-09-09 08:10:06 -04:00
parent 2fb838dd9a
commit 50e8b2f41f
15 changed files with 148 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
---
# defaults/main.yml
# define default variable values here

View File

@@ -0,0 +1,9 @@
---
# handlers/main.yml
# define handlers here
#- name: restart <service>
# service: name=<service> state=restarted
#- name: stop <service>
# service: name=<service> state=stopped

View File

@@ -0,0 +1,8 @@
---
# meta/main.yml
# define dependancies here
# dependencies:
# - { role: geerlingguy.java }
dependencies: []

View File

@@ -0,0 +1,4 @@
---
# tasks/main.yml
# define tasks here

View File

@@ -0,0 +1,10 @@
---
# vars/_extravars.yml
# define extra variable values here
# this file should be loaded via an include_vars statement in the task.
# often this is used for managing differences in os.
# Variable setup.
#- name: Include OS-Specific variables
# include_vars: "{{ ansible_os_family }}.yml"

1
roles/java Submodule

Submodule roles/java added at 14df32ccb7

1
roles/jenkins Submodule

Submodule roles/jenkins added at 0b3c51a793

View File

@@ -0,0 +1,4 @@
---
# defaults/main.yml
# define default variable values here

View File

@@ -0,0 +1,12 @@
---
# handlers/main.yml
# define handlers here
#- name: restart <service>
# service: name=<service> state=restarted
#- name: stop <service>
# service: name=<service> state=stopped
- name: reload nginx
service: name=nginx state=reloaded

View File

@@ -0,0 +1,8 @@
---
# meta/main.yml
# define dependancies here
# dependencies:
# - { role: geerlingguy.java }
dependencies: []

View File

@@ -0,0 +1,16 @@
---
# tasks/main.yml
# define tasks here
- name: Install the nginx packages
apt: name={{ item }} state=present
with_items:
- nginx
# - name: Ensure log directory exist
# file: path=/etc/nginx/sites-enabled state=directory mode=0644
- name: Copy the nginx configuration file
template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf
notify:
- reload nginx

View File

@@ -0,0 +1,49 @@
user root;
worker_processes 8;
worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;
pid /var/run/nginx.pid;
worker_rlimit_nofile 65535;
events {
use epoll;
worker_connections 65535;
}
http {
server_tokens off;
include mime.types;
default_type application/octet-stream;
log_format full '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$http_x_forwarded_for" $request_time';
charset utf-8;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 64k;
client_max_body_size 8m;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 60;
open_file_cache max=65535 inactive=10s;
open_file_cache_valid 30s;
open_file_cache_min_uses 1;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/javascript text/css application/xml application/json;
gzip_vary on;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

View File

@@ -0,0 +1,10 @@
---
# vars/_extravars.yml
# define extra variable values here
# this file should be loaded via an include_vars statement in the task.
# often this is used for managing differences in os.
# Variable setup.
#- name: Include OS-Specific variables
# include_vars: "{{ ansible_os_family }}.yml"