1
0
Fork 0
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:
patchback[bot] 2023-07-08 18:09:06 +02:00 committed by GitHub
parent 15cbc9665e
commit 3c5094d971
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,25 @@ DOCUMENTATION = '''
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.path
import subprocess