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.
1 parent ee5219d commit 76dc034Copy full SHA for 76dc034
1 file changed
bootc/ansible-facts/bootc.fact
@@ -14,6 +14,15 @@ is_bootc() {
14
BOOTC_STATUS=$(sudo bootc status --json | jq .status.type)
15
if [[ "$BOOTC_STATUS" == \"bootcHost\" ]]; then
16
BOOTC_SYSTEM="true"
17
+ return
18
+ fi
19
+
20
+ # Fallback: if bootc status type is set to nil for some reasons like
21
+ # rpm-ostree install, or bootc is not able to confirm that the system is
22
+ # not bootc anymore
23
+ # NOTE: rpm-ostree install should not be allowed in production systems.
24
+ if [[ -d /sysroot/ostree/bootc ]] || [[ -d /ostree/bootc ]]; then
25
+ BOOTC_SYSTEM="true"
26
fi
27
}
28
0 commit comments