testing role
This commit is contained in:
@@ -1,2 +1,12 @@
|
|||||||
---
|
---
|
||||||
# handlers file for tsm_labs
|
# handlers file for itt_labs
|
||||||
|
- name: Enable nginx service
|
||||||
|
ansible.builtin.systemd_service:
|
||||||
|
name: "nginx.service"
|
||||||
|
state: restarted
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
- name: Reload nginx service
|
||||||
|
ansible.builtin.systemd_service:
|
||||||
|
name: "nginx.service"
|
||||||
|
state: restarted
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: your name
|
author: Serjio
|
||||||
description: your role description
|
description: The first try
|
||||||
company: your company (optional)
|
company: Bonch
|
||||||
|
|
||||||
# If the issue tracker for your role is not on github, uncomment the
|
# If the issue tracker for your role is not on github, uncomment the
|
||||||
# next line and provide a value
|
# next line and provide a value
|
||||||
@@ -14,7 +14,7 @@ galaxy_info:
|
|||||||
# - GPL-3.0-only
|
# - GPL-3.0-only
|
||||||
# - Apache-2.0
|
# - Apache-2.0
|
||||||
# - CC-BY-4.0
|
# - CC-BY-4.0
|
||||||
license: license (GPL-2.0-or-later, MIT, etc)
|
license: BSD-3-Clause
|
||||||
|
|
||||||
min_ansible_version: 2.1
|
min_ansible_version: 2.1
|
||||||
|
|
||||||
|
|||||||
+48
-1
@@ -1,2 +1,49 @@
|
|||||||
---
|
---
|
||||||
# tasks file for tsm_labs
|
- name: Update packeges
|
||||||
|
hosts: node
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: Update all packages Ubuntu
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
upgrade: yes
|
||||||
|
|
||||||
|
- name: Update all packages CentOS
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
|
yum:
|
||||||
|
name: '*'
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: Install nginx 'Ubuntu'
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
ansible.builtin.apt:
|
||||||
|
package:
|
||||||
|
- nginx
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Install nginx 'RedHat'
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name:
|
||||||
|
- nginx
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Copy config nginx
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: nginx.conf.j2
|
||||||
|
dest: /etc/nginx/nginx.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
made: '0644'
|
||||||
|
notify: Reload nginx service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
user {{ nginx_user }};
|
||||||
|
worker_processes 2048;
|
||||||
|
worker_priority -1;
|
||||||
|
|
||||||
|
error_log /var/log/nginx/error.log warn;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections {{worker_connections}};
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
access_log /var/log/nginx/access.log main;
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
reset_timedout_connection on;
|
||||||
|
client_body_timeout 35;
|
||||||
|
send_timeout 30;
|
||||||
|
gzip on;
|
||||||
|
gzip_min_length {{gzip_min_length}};
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
|
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; gzip_disable "msie6";
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
client_max_body_size {{client_max_body_size}};
|
||||||
|
proxy_buffer_size 64k;
|
||||||
|
proxy_buffers 4 64k;
|
||||||
|
proxy_busy_buffers_size 64k;
|
||||||
|
server_names_hash_bucket_size 64;
|
||||||
|
include /etc/nginx/modules-enabled/*.conf;
|
||||||
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
include /etc/nginx/sites-enabled/*;
|
||||||
|
}
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
localhost
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
remote_user: root
|
|
||||||
roles:
|
|
||||||
- tsm_labs
|
|
||||||
@@ -1,2 +1,5 @@
|
|||||||
---
|
---
|
||||||
# vars file for tsm_labs
|
worker_connections: auto
|
||||||
|
gzip_min_length: 1000
|
||||||
|
client_max_body_size: 512m
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user