We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5ee31c1 + 032b63e commit 1c4994bCopy full SHA for 1c4994b
bootc/ansible-facts/bootc.fact
@@ -1,11 +1,19 @@
1
#!/usr/bin/env bash
2
3
BOOTC_SYSTEM="false"
4
+BOOTC_PACKAGE=$(rpm -qa | grep bootc)
5
+
6
+# If the system isn't using bootc, we can exit early here since the
7
+# RPM wont be installed.
8
+if [[ $BOOTC_PACKAGE == "" ]]; then
9
+ echo ${BOOTC_SYSTEM}
10
+ exit
11
+fi
12
13
is_bootc() {
14
BOOTC_STATUS=$(sudo bootc status --json | jq .status.type)
15
if [[ "$BOOTC_STATUS" == \"bootcHost\" ]]; then
- BOOTC_SYSTEM="true"
16
+ BOOTC_SYSTEM="true"
17
fi
18
}
19
0 commit comments