From: Oleg Broytman Date: Mon, 1 Aug 2022 21:38:09 +0000 (+0300) Subject: Style: `ip -o` -> `ip --oneline` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=0b4114547179ea2063b21f558796d6257f656a4d;p=ansible.git Style: `ip -o` -> `ip --oneline` --- diff --git a/playbooks/roles/debian/firewall/files/etc/network/functions.phd b/playbooks/roles/debian/firewall/files/etc/network/functions.phd index 613089b..8d4e865 100644 --- a/playbooks/roles/debian/firewall/files/etc/network/functions.phd +++ b/playbooks/roles/debian/firewall/files/etc/network/functions.phd @@ -56,6 +56,6 @@ start_firewall() { $IPTABLES -A INPUT -p tcp --sport 1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A INPUT -p tcp --dport 1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT - MY_IP=$(ip -o -4 address show up | awk '{split($4,a,/\//); if (a[1] != "127.0.0.1") print a[1]}') + MY_IP=$(ip --oneline -4 address show up | awk '{split($4,a,/\//); if (a[1] != "127.0.0.1") print a[1]}') for ip in $MY_IP; do my_ip "$ip"; done } diff --git a/playbooks/roles/redhat/firewall/files/etc/network/functions.phd b/playbooks/roles/redhat/firewall/files/etc/network/functions.phd index 613089b..8d4e865 100644 --- a/playbooks/roles/redhat/firewall/files/etc/network/functions.phd +++ b/playbooks/roles/redhat/firewall/files/etc/network/functions.phd @@ -56,6 +56,6 @@ start_firewall() { $IPTABLES -A INPUT -p tcp --sport 1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A INPUT -p tcp --dport 1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT - MY_IP=$(ip -o -4 address show up | awk '{split($4,a,/\//); if (a[1] != "127.0.0.1") print a[1]}') + MY_IP=$(ip --oneline -4 address show up | awk '{split($4,a,/\//); if (a[1] != "127.0.0.1") print a[1]}') for ip in $MY_IP; do my_ip "$ip"; done }