Skip to content

Commit 56e5d77

Browse files
committed
Update examples for podman_container_exec
Signed-off-by: nishipy <[email protected]>
1 parent dd1fa67 commit 56e5d77

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

plugins/modules/podman_container_exec.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,24 @@
6767

6868
EXAMPLES = r'''
6969
- name: Execute a command with workdir
70-
containers.podman.podman_container_exec:
70+
containers.podman.podman_container_exec:
7171
name: ubi8
7272
command: "cat redhat-release"
7373
workdir: /etc
7474
7575
- name: Execute a command with a list of args and enviroment variables
76-
containers.podman.podman_container_exec:
76+
containers.podman.podman_container_exec:
7777
name: test_container
7878
argv:
79-
- /bin/sh
80-
- -c
81-
- echo $HELLO $BYE
79+
- /bin/sh
80+
- -c
81+
- echo $HELLO $BYE
8282
env:
83-
HELLO: hello world
84-
BYE: goodbye world
83+
HELLO: hello world
84+
BYE: goodbye world
8585
8686
- name: Execute command in background by using detach
87-
containers.podman.podman_container_exec:
87+
containers.podman.podman_container_exec:
8888
name: detach_container
8989
command: "cat redhat-release"
9090
detach: true
@@ -115,12 +115,11 @@
115115
- The ID of the exec session.
116116
'''
117117

118-
import shlex
119-
from ansible.module_utils.six import string_types
120-
from ansible.module_utils._text import to_text
121-
from ansible.module_utils.basic import AnsibleModule
122118
from ansible_collections.containers.podman.plugins.module_utils.podman.common import run_podman_command
123-
119+
from ansible.module_utils.basic import AnsibleModule
120+
from ansible.module_utils._text import to_text
121+
from ansible.module_utils.six import string_types
122+
import shlex
124123

125124
def run_container_exec(module: AnsibleModule) -> dict:
126125
'''

0 commit comments

Comments
 (0)