Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Using python subprocess in Kickstart snippet

    Posted on

    I'd like to use python subprocess in my kickstart snippet.

    The tail end of my /etc/cobbler/settings has:

    cheetah_import_whitelist:
    - "random"
    - "re"
    - "time"
    - "subprocess"

    My snippet is:

    echo "#a test"

    import subprocess

    set $parts=subprocess.STD_INPUT_HANDLE

    set $parts="XX"

    echo "#$parts"

    My pre-script is (Template is checked):

    echo "#a-test"
    $SNIPPET('spacewalk/1/a-test')

    This causes a blank Kickstart File for the profile. If I comment out the set and uncomment the other set I get the Kickstart File that I expect.

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat