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