Skip to content

Commit ac2882a

Browse files
authored
docs: fix dynamic execution example
1 parent 2a7ea0f commit ac2882a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/examples/dynamic_execution_deploy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ apt.packages(
1818
)
1919

2020
def authorize_server(state, host):
21-
# Run a command on the server and collect status, stderr and stdout
22-
status, stdout, stderr = host.run_shell_command('cat /var/lib/zerotier-one/identity.public')
21+
# Run a command on the server and collect status and command output
22+
status, output = host.run_shell_command('cat /var/lib/zerotier-one/identity.public')
2323
assert status is True # ensure the command executed OK
2424

25-
# First line of output is the identity
26-
server_id = stdout[0]
25+
# First line of stdout is the identity
26+
server_id = output.stdout_lines[0]
2727

2828
# Authorize via the ZeroTier API
2929
response = requests.post('https://my.zerotier.com/.../{0}'.format(server_id))

0 commit comments

Comments
 (0)