Changed to webdav
This commit is contained in:
@@ -17,27 +17,33 @@
|
||||
- name: Collecter la configuration réseau et DNS
|
||||
shell: |
|
||||
echo "=== Configuration réseau de {{ inventory_hostname }} ===" > /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "Hostname :" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
hostname >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
|
||||
# --- Réseau ---
|
||||
echo "=> ip -4 addr show" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
ip -4 addr show >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "=> cat /etc/hostname" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
cat /etc/hostname >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "=> ip route show" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
ip route show >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
|
||||
# --- DNS ---
|
||||
echo "=== Configuration DNS ===" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "=> cat /etc/resolv.conf" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
cat /etc/resolv.conf >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "=> resolvectl status" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
resolvectl status >> /tmp/config_{{ inventory_hostname }}.txt 2>&1 || true
|
||||
|
||||
# --- Netplan ---
|
||||
echo "=== Configuration Netplan ===" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
|
||||
if [ -d /etc/netplan ]; then
|
||||
echo "Fichiers Netplan :" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "=> Fichiers Netplan :" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
ls -1 /etc/netplan >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
|
||||
@@ -49,11 +55,11 @@
|
||||
|
||||
# netplan get (Ubuntu 22.04+)
|
||||
if command -v netplan >/dev/null 2>&1; then
|
||||
echo "=== netplan get ===" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "=> netplan get" >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
netplan get >> /tmp/config_{{ inventory_hostname }}.txt 2>&1 || true
|
||||
fi
|
||||
else
|
||||
echo "Netplan non présent sur ce système." >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
echo "!!! Netplan non présent sur ce système." >> /tmp/config_{{ inventory_hostname }}.txt
|
||||
fi
|
||||
|
||||
args:
|
||||
|
||||
Reference in New Issue
Block a user