Skip to content

Commit 004cd8e

Browse files
lorenzphFizzadar
authored andcommitted
pyinfra/operations: Fix removal of docker network
The wrong command was used when triggering removal of a network.
1 parent 349cca5 commit 004cd8e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

pyinfra/operations/docker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def network(
288288

289289
yield handle_docker(
290290
resource="network",
291-
command="create",
291+
command="remove",
292292
network=network,
293293
)
294294

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"kwargs": {
3+
"network": "nginx",
4+
"present": false
5+
},
6+
"facts": {
7+
"docker.DockerNetwork": {
8+
"object_id=nginx": []
9+
}
10+
},
11+
"commands": [
12+
"docker network rm nginx"
13+
]
14+
}

0 commit comments

Comments
 (0)