use server.shell() instead of host.fact.command()
@@ -4,8 +4,10 @@ from pyinfra.modules import lxd
SUDO = True
# Note: This is an example of running a command on remote
-# init lxd using all defaults
-host.fact.command('lxd init --auto')
+server.shell(
+ {'Run lxd auto init'},
+ 'lxd init --auto',
+)
lxd.container(
{'Add an ubuntu container'},
