Install Nginx and Apache log configs
This commit is contained in:
parent
f379f60e90
commit
366b226019
|
@ -0,0 +1,2 @@
|
||||||
|
CustomLog "| /usr/bin/logger -thttpd -plocal6.info" combined
|
||||||
|
ErrorLog "| /usr/bin/logger -thttpd -plocal6.error"
|
|
@ -0,0 +1,2 @@
|
||||||
|
access_log syslog:server=unix:/dev/log,tag=nginx,facility=local7,severity=info;
|
||||||
|
error_log syslog:server=unix:/dev/log,tag=nginx,facility=local7,severity=error;
|
|
@ -12,6 +12,8 @@
|
||||||
group: root
|
group: root
|
||||||
with_items:
|
with_items:
|
||||||
- '{{ common__apache__conf_dir }}'
|
- '{{ common__apache__conf_dir }}'
|
||||||
|
- '{{ common__apache__conf_available_dir }}'
|
||||||
|
- '{{ common__apache__conf_enabled_dir }}'
|
||||||
- '{{ common__apache__available_dir }}'
|
- '{{ common__apache__available_dir }}'
|
||||||
- '{{ common__apache__enabled_dir }}'
|
- '{{ common__apache__enabled_dir }}'
|
||||||
- '{{ common__apache__snippets_dir }}'
|
- '{{ common__apache__snippets_dir }}'
|
||||||
|
@ -32,6 +34,24 @@
|
||||||
line: 'Options FollowSymLinks'
|
line: 'Options FollowSymLinks'
|
||||||
notify: common | Restart Apache
|
notify: common | Restart Apache
|
||||||
|
|
||||||
|
- name: Install Apache log config
|
||||||
|
copy:
|
||||||
|
src: 'files/apache/syslog.conf'
|
||||||
|
dest: '{{ common__apache__conf_available_dir }}/syslog.conf'
|
||||||
|
mode: 'u=rw,g=r,o=r'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
notify: common | Restart Apache
|
||||||
|
|
||||||
|
- name: Enable Apache log config
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
src: '{{ common__apache__conf_available_dir }}/syslog.conf'
|
||||||
|
dest: '{{ common__apache__conf_enabled_dir }}/syslog.conf'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
notify: common | Restart Apache
|
||||||
|
|
||||||
- name: Remove Apache default site
|
- name: Remove Apache default site
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
|
|
|
@ -16,6 +16,16 @@
|
||||||
- '{{ common__nginx__available_dir }}'
|
- '{{ common__nginx__available_dir }}'
|
||||||
- '{{ common__nginx__enabled_dir }}'
|
- '{{ common__nginx__enabled_dir }}'
|
||||||
- '{{ common__nginx__snippets_dir }}'
|
- '{{ common__nginx__snippets_dir }}'
|
||||||
|
notify: common | Restart Nginx
|
||||||
|
|
||||||
|
- name: Install Nginx log config
|
||||||
|
copy:
|
||||||
|
src: 'files/nginx/syslog.conf'
|
||||||
|
dest: '{{ common__nginx__confd_dir }}/syslog.conf'
|
||||||
|
mode: 'u=rw,g=r,o=r'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
notify: common | Restart Nginx
|
||||||
|
|
||||||
- name: Remove Nginx default site
|
- name: Remove Nginx default site
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -14,6 +14,8 @@ common__nginx__enabled_dir: '{{ common__nginx__conf_dir }}/sites-enabled'
|
||||||
common__nginx__snippets_dir: '{{ common__nginx__conf_dir }}/snippets'
|
common__nginx__snippets_dir: '{{ common__nginx__conf_dir }}/snippets'
|
||||||
|
|
||||||
common__apache__conf_dir: '/etc/apache2'
|
common__apache__conf_dir: '/etc/apache2'
|
||||||
|
common__apache__conf_available_dir: '{{ common__apache__conf_dir }}/conf-available'
|
||||||
|
common__apache__conf_enabled_dir: '{{ common__apache__conf_dir }}/conf-enabled'
|
||||||
common__apache__available_dir: '{{ common__apache__conf_dir }}/sites-available'
|
common__apache__available_dir: '{{ common__apache__conf_dir }}/sites-available'
|
||||||
common__apache__enabled_dir: '{{ common__apache__conf_dir }}/sites-enabled'
|
common__apache__enabled_dir: '{{ common__apache__conf_dir }}/sites-enabled'
|
||||||
common__apache__snippets_dir: '{{ common__apache__conf_dir }}/snippets'
|
common__apache__snippets_dir: '{{ common__apache__conf_dir }}/snippets'
|
||||||
|
|
Loading…
Reference in New Issue