mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #6824/59479b4a backport][stable-7] chroot: added an example (#6899)
chroot: added an example (#6824)
* chroot: added an example
Added a simple example of chroot connection plugin
Fixes: #6365
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 59479b4abd
)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
15cbc9665e
commit
3c5094d971
1 changed files with 19 additions and 0 deletions
|
@ -48,6 +48,25 @@ DOCUMENTATION = '''
|
||||||
default: chroot
|
default: chroot
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
EXAMPLES = r"""
|
||||||
|
# Static inventory file
|
||||||
|
#
|
||||||
|
# [chroots]
|
||||||
|
# /path/to/debootstrap
|
||||||
|
# /path/to/feboostrap
|
||||||
|
# /path/to/lxc-image
|
||||||
|
# /path/to/chroot
|
||||||
|
|
||||||
|
# playbook
|
||||||
|
---
|
||||||
|
- hosts: chroots
|
||||||
|
connection: community.general.chroot
|
||||||
|
tasks:
|
||||||
|
- debug:
|
||||||
|
msg: "This is coming from chroot environment"
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
Loading…
Reference in a new issue