network: ansible-lint fixes

This commit is contained in:
Timo Makinen 2022-10-30 15:20:03 +00:00
parent d833b57877
commit 4b0f5522c8
4 changed files with 79 additions and 61 deletions

View file

@ -1,14 +1,18 @@
---
- block:
- name: restart network
command: /bin/sh /etc/netstart
when: ansible_os_family == "OpenBSD"
- name: Restart network
ansible.builtin.command:
argv:
- /bin/sh
- /etc/netstart
- name: Reload network manager connections
ansible.builtin.command:
argv:
- nmcli
- c
- reload
- block:
- name: reload network manager connections
command: nmcli c reload
- name: restart keepalived
service:
name: keepalived
state: restarted
when: ansible_os_family == "RedHat"
- name: Restart keepalived
ansible.builtin.service:
name: keepalived
state: restarted