fix some ansible 2.8 deprecation warnings
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2019-05-19 22:50:00 +02:00
parent 19cf8dc4ea
commit cd086acc82
3 changed files with 9 additions and 7 deletions

View File

@ -39,13 +39,13 @@
copy: copy:
content: "{{ homeassistant_cmdline_content }}" content: "{{ homeassistant_cmdline_content }}"
dest: /boot/cmdline.txt dest: /boot/cmdline.txt
when: homeassistant_cmdline_override_enabled when: homeassistant_cmdline_override_enabled | bool
- name: Exclude serial devices from ModemManager - name: Exclude serial devices from ModemManager
template: template:
src: "etc/udev/rules.d/99-mm-disable.rules.j2" src: "etc/udev/rules.d/99-mm-disable.rules.j2"
dest: "/etc/udev/rules.d/99-mm-disable.rules" dest: "/etc/udev/rules.d/99-mm-disable.rules"
when: homeassistant_exclude_modemmanager when: homeassistant_exclude_modemmanager | bool
notify: __udev_reload notify: __udev_reload
- name: Copy systemd unit file - name: Copy systemd unit file
@ -64,6 +64,6 @@
loop: "{{ homeassistant_open_ports }}" loop: "{{ homeassistant_open_ports }}"
loop_control: loop_control:
label: "{{ item.name }}" label: "{{ item.name }}"
when: homeassistant_iptables_enabled when: homeassistant_iptables_enabled | bool
become: True become: True
become_user: root become_user: root

View File

@ -2,8 +2,8 @@
- import_tasks: prepare.yml - import_tasks: prepare.yml
- import_tasks: install.yml - import_tasks: install.yml
- import_tasks: tls.yml - import_tasks: tls.yml
when: homeassistant_tls_enabled when: homeassistant_tls_enabled | bool
tags: tls_renewal tags: tls_renewal
- import_tasks: nginx.yml - import_tasks: nginx.yml
when: homeassistant_nginx_vhost_enabled when: homeassistant_nginx_vhost_enabled | bool
- import_tasks: post_tasks.yml - import_tasks: post_tasks.yml

View File

@ -12,7 +12,7 @@
label: "{{ item.dest }}" label: "{{ item.dest }}"
notify: __nginx_reload notify: __nginx_reload
delegate_to: "{{ homeassistant_nginx_server }}" delegate_to: "{{ homeassistant_nginx_server }}"
when: homeassistant_nginx_tls_enabled when: homeassistant_nginx_tls_enabled | bool
become: True become: True
become_user: root become_user: root
tags: tls_renewal tags: tls_renewal
@ -42,7 +42,9 @@
name: allow_homeassistant_nginx_proxy name: allow_homeassistant_nginx_proxy
state: present state: present
rules: "-A OUTPUT -m state --state NEW -p tcp -d {{ homeassistant_nginx_proxy_url | urlsplit('hostname') }} --dport {{ homeassistant_nginx_proxy_url | urlsplit('port') }} -j ACCEPT" rules: "-A OUTPUT -m state --state NEW -p tcp -d {{ homeassistant_nginx_proxy_url | urlsplit('hostname') }} --dport {{ homeassistant_nginx_proxy_url | urlsplit('port') }} -j ACCEPT"
when: homeassistant_nginx_iptables_enabled and (not homeassistant_nginx_server == inventory_hostname or not homeassistant_nginx_server == "localhost") when:
- homeassistant_nginx_iptables_enabled | bool
- (not homeassistant_nginx_server == inventory_hostname or not homeassistant_nginx_server == "localhost")
delegate_to: "{{ homeassistant_nginx_server }}" delegate_to: "{{ homeassistant_nginx_server }}"
become: True become: True
become_user: root become_user: root