Skip to content

Commit

Permalink
Merge pull request #655 from konstruktoid/notattr
Browse files Browse the repository at this point in the history
use systemctl in systemd facts
  • Loading branch information
konstruktoid committed May 21, 2024
2 parents bb6b9e7 + e9ac327 commit cf8ee94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/etc/ansible/facts.d/systemd.fact
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
if command -v systemctl 1>/dev/null; then
echo "{ \"version\" : $(systemd --version | grep '^systemd\s' | awk '{print $2}' | cut -c 1-3) }"
echo "{ \"version\" : $(systemctl --version | grep '^systemd\s' | awk '{print $2}' | cut -c 1-3) }"
else
echo "{ \"version\" : false }"
fi

0 comments on commit cf8ee94

Please sign in to comment.