Skip to content

Commit

Permalink
Merge pull request #650 from konstruktoid/systemdversion
Browse files Browse the repository at this point in the history
return only systemd major version
  • Loading branch information
konstruktoid authored May 19, 2024
2 parents 562ff55 + 3e6460a commit e628d5f
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\" : $(systemctl --version | grep '^systemd\s' | awk '{print $2}') }"
echo "{ \"version\" : $(systemd --version | grep '^systemd\s' | awk '{print $2}' | cut -c 1-3) }"
else
echo "{ \"version\" : false }"
fi

0 comments on commit e628d5f

Please sign in to comment.