Commit 97c17edb authored by Jocelyn Delalande's avatar Jocelyn Delalande

munin-node, nginx: new-style apt multi-pkg

parent 622513fd
- name: Install munin-node and smartmontools
apt: pkg={{item}} state=present
with_items:
- munin-node
- smartmontools
apt:
state: present
pkg:
- munin-node
- smartmontools
- import_tasks: custom-plugins.yml
......@@ -29,11 +30,3 @@
file: path=/etc/munin/plugins/{{ item }} state=absent
with_items: "{{ munin_disabled_modules }}"
notify: restart munin-node
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788736#12
# This task could go away as soon as the Debian bugfix lands into stable
- name: fix df and df_inode modules to prevent false positives
copy:
src: files/plugin-conf-fix-df-false-positive-fix
dest: /etc/munin/plugin-conf.d/df-false-positive-fix
notify: restart munin-node
- name: Install APT packages
apt: name={{ item }} update_cache=yes cache_valid_time=3600
with_items:
- nginx
- ssl-cert
apt:
name:
- nginx
- ssl-cert
- python-passlib
update_cache: yes
cache_valid_time: 3600
- name: Install nginx.conf
template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf
......@@ -13,6 +16,17 @@
with_items:
- /etc/nginx/sites-enabled/default
- name: Generate require htpasswd (1 file per location)
when: "{{ item.1.auth_basic_username is defined and item.1.auth_basic_password is defined }}"
htpasswd:
path: '/etc/nginx/.htpasswd-{{ item.0.domain }}-{{ item.1.path|replace("/","-") }}'
name: "{{ item.1.auth_basic_username }}"
password: "{{ item.1.auth_basic_password }}"
owner: root
group: www-data
mode: 0640
loop: "{{ nginx_vhosts|subelements('locations', skip_missing=True) }}"
- name: snakeoil certificates are in place (used when LE certificates have not been generated yet)
command: openssl req -x509 -nodes -subj '/CN=localhost' -newkey rsa:4096 -keyout snakeoil.key -out snakeoil.crt -days 4096
args:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment