from pyinfra import host from pyinfra.facts.files import File from pyinfra.facts.server import LinuxName from pyinfra.operations import apk, apt, files, pip, python, yum if host.get_fact(LinuxName) in ["Alpine"]: apk.packages( name="Install packages for python virtual environments", packages=[ "gcc", "g++", "libffi-dev", "make", "musl-dev", "openssl-dev", "py3-pynacl", "py3-virtualenv", "python3-dev", ], ) if host.get_fact(LinuxName) in ["CentOS"]: yum.packages( name="Install pip3 so you can install virtualenv", packages=["python3-pip", "python3-devel", "gcc-c++", "make"], ) if host.get_fact(LinuxName) in ["Ubuntu"]: apt.packages( name="Install pip3 so you can install virtualenv", packages="python3-pip",
from pyinfra import host from pyinfra.operations import apk, apt, files, pip, python, yum SUDO = True if host.fact.linux_name in ['Alpine']: apk.packages( name='Install packages for python virtual environments', packages=[ 'gcc', 'libffi-dev', 'make', 'musl-dev', 'openssl-dev', 'py3-pynacl', 'py3-virtualenv', 'python3-dev', ], ) if host.fact.linux_name in ['CentOS']: yum.packages( name='Install pip3 so you can install virtualenv', packages='python3-pip', ) if host.fact.linux_name in ['Ubuntu']: apt.packages( name='Install pip3 so you can install virtualenv', packages='python3-pip', update=True,
from pyinfra import host from pyinfra.operations import apk SUDO = True if host.fact.linux_name == 'Alpine': apk.packages( name='Install Asterisk and Vim', packages=['asterisk', 'vim'], update=True, )
from pyinfra import host from pyinfra.operations import apk SUDO = True if host.fact.linux_name == 'Alpine': apk.packages( {'Install Asterisk and Vim'}, ['asterisk', 'vim'], update=True, )
from pyinfra import host from pyinfra.operations import apk, apt, files, git, yum SUDO = True if host.fact.linux_name in ['Alpine']: apk.packages( name='Install git', packages=['git'], ) if host.fact.linux_name in ['CentOS']: yum.packages( name='Install git', packages=['git'], update=True, ) if host.fact.linux_name in ['Ubuntu']: apt.packages( name='Install git', packages=['git'], update=True, ) src_dir = '/usr/local/src' dest = src_dir + '/pyinfra' files.directory( name='Ensure the src_dir directory exists', path=src_dir,
from pyinfra import host from pyinfra.facts.server import LinuxName from pyinfra.operations import apk, apt, files, git, yum if host.get_fact(LinuxName) in ["Alpine"]: apk.packages( name="Install git", packages=["git"], ) if host.get_fact(LinuxName) in ["CentOS"]: yum.packages( name="Install git", packages=["git"], update=True, ) if host.get_fact(LinuxName) in ["Ubuntu"]: apt.packages( name="Install git", packages=["git"], update=True, ) src_dir = "/usr/local/src" dest = src_dir + "/pyinfra" files.directory( name="Ensure the src_dir directory exists", path=src_dir, )
from pyinfra import host from pyinfra.operations import apk, apt, files, git, yum SUDO = True if host.fact.linux_name in ['Alpine']: apk.packages( {'Install git'}, 'git', ) if host.fact.linux_name in ['CentOS']: yum.packages( {'Install git'}, 'git', update=True, ) if host.fact.linux_name in ['Ubuntu']: apt.packages( {'Install git'}, 'git', update=True, ) src_dir = '/usr/local/src' dest = src_dir + '/pyinfra' files.directory( {'Ensure the src_dir directory exists'}, src_dir,