forked from evolix/ansible-roles
nginx: improve tasks naiming
This commit is contained in:
parent
e089ddf091
commit
37cb18f676
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
|
||||
- name: logrotate configuration
|
||||
- name: Logrotate is configured for Nginx
|
||||
copy:
|
||||
src: logrotate_nginx
|
||||
dest: /etc/logrotate.d/nginx
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
|
||||
- name: Copy Munin config for Nginx
|
||||
- name: Munin config for Nginx is present
|
||||
template:
|
||||
src: munin/evolinux.nginx
|
||||
dest: /etc/munin/plugin-conf.d/
|
||||
mode: "0644"
|
||||
notify: restart munin
|
||||
|
||||
- name: Enable Munin plugins for Nginx
|
||||
- name: Munin plugins for Nginx are installed
|
||||
file:
|
||||
src: '/usr/share/munin/plugins/{{ item }}'
|
||||
dest: '/etc/munin/plugins/{{ item }}'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
line: '127.0.0.1 munin'
|
||||
insertafter: EOF
|
||||
|
||||
- name: Ensure packages for Munin CGI are installed
|
||||
- name: Packages for Munin CGI are installed
|
||||
apt:
|
||||
name:
|
||||
- liblwp-useragent-determined-perl
|
||||
|
@ -14,26 +14,26 @@
|
|||
- spawn-fcgi
|
||||
state: present
|
||||
|
||||
- name: Adjust owner for munin-cgi
|
||||
- name: Owner for munin-cgi is set to www-data:munin
|
||||
shell: "chown --verbose www-data:munin /var/log/munin/munin-cgi-*"
|
||||
register: command_result
|
||||
changed_when: "'changed' in command_result.stdout"
|
||||
args:
|
||||
warn: no
|
||||
|
||||
- name: Adjust rights for munin-cgi
|
||||
- name: Mode for munin-cgi is set to 660
|
||||
shell: "chmod --verbose 660 /var/log/munin/munin-cgi-*"
|
||||
register: command_result
|
||||
changed_when: "'changed' in command_result.stdout"
|
||||
args:
|
||||
warn: no
|
||||
|
||||
- name: Systemd unit for Munin-fcgi
|
||||
- name: Systemd unit for Munin-fcgi is installed
|
||||
copy:
|
||||
src: systemd/spawn-fcgi-munin-graph.service
|
||||
dest: /etc/systemd/system/spawn-fcgi-munin-graph.service
|
||||
|
||||
- name: Enable and start Munin-fcgi
|
||||
- name: Systemd unit for Munin-fcgi is started
|
||||
systemd:
|
||||
name: spawn-fcgi-munin-graph
|
||||
daemon_reload: yes
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
# TODO: install "nginx" + only necessary modules, instead of "nginx-full"
|
||||
|
||||
- name: Ensure Nginx is installed
|
||||
- name: Nginx is installed
|
||||
apt:
|
||||
name: "{{ nginx_package_name | default(nginx_default_package_name) }}"
|
||||
state: present
|
||||
|
@ -17,7 +17,7 @@
|
|||
- nginx
|
||||
- packages
|
||||
|
||||
- name: Ensure nginx service is running as configured.
|
||||
- name: Service is running as configured.
|
||||
service:
|
||||
name: nginx
|
||||
state: "{{ nginx_service_state }}"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
|
||||
- include_role:
|
||||
- name: Backports repository is configured
|
||||
include_role:
|
||||
name: evolix/apt
|
||||
tasks_from: backports.yml
|
||||
tags:
|
||||
|
@ -18,7 +19,7 @@
|
|||
- nginx
|
||||
- packages
|
||||
|
||||
- name: update apt
|
||||
- name: APT cache is updated
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: nginx_apt_preferences is changed
|
||||
|
|
Loading…
Reference in a new issue