Saltstack module inspector 详解

inspector.query

Query the node for specific information.

Parameters:

* **scope**: Specify scope of the query.

   * **System**: Return system data.

   * **Software**: Return software information.

   * **Services**: Return known services.

   * **Identity**: Return user accounts information for this system.
      accounts
        Can be either ‘local‘, ‘remote‘ or ‘all‘ (equal to "local,remote").
        Remote accounts cannot be resolved on all systems, but only
        those, which supports ‘passwd -S -a‘.

      disabled
        True (or False, default) to return only disabled accounts.

   * **payload**: Payload scope parameters:
      filter
        Include only results which path starts from the filter string.

      time
        Display time in Unix ticks or format according to the configured TZ (default)
        Values: ticks, tz (default)

      size
        Format size. Values: B, KB, MB, GB

      type
        Include payload type.
        Values (comma-separated): directory (or dir), link, file (default)
        Example (returns everything): type=directory,link,file

      owners
        Resolve UID/GID to an actual names or leave them numeric (default).
        Values: name (default), id

      brief
        Return just a list of payload elements, if True. Default: False.

   * **all**: Return all information (default).

CLI Example:

    salt ‘*‘ inspector.query scope=system
    salt ‘*‘ inspector.query scope=payload type=file,link filter=/etc size=Kb brief=False

inspector.inspect

Start node inspection and save the data to the database for further query.

Parameters:

* **mode**: Clarify inspection mode: configuration, payload, all (default)

  payload
    * **filter**: Comma-separated directories to track payload.

* **priority**: (advanced) Set priority of the inspection. Default is low priority.

CLI Example:

    salt ‘*‘ inspector.inspect
    salt ‘*‘ inspector.inspect configuration
    salt ‘*‘ inspector.inspect payload filter=/opt,/ext/oracle

inspector.snapshots

List current description snapshots.

CLI Example:

    salt myminion inspector.snapshots

inspector.delete

Remove description snapshots from the system.

::parameter: all. Default: False. Remove all snapshots, if set to True.

CLI example:

    salt myminion inspector.delete <ID> <ID1> <ID2>..
    salt myminion inspector.delete all=True

inspector.export

Export an image description for Kiwi.

Parameters:

* **local**: Specifies True or False if the export has to be in the local file. Default: False.
* **path**: If `local=True`, then specifies the path where file with the Kiwi description is written.
            Default: `/tmp`.

CLI Example:

    salt myminion inspector.export
    salt myminion inspector.export format=iso path=/opt/builds/

inspector.build

Build an image from a current system description.
The image is a system image can be output in bootable ISO or QCOW2 formats.

Node uses the image building library Kiwi to perform the actual build.

Parameters:

* **format**: Specifies output format: "qcow2" or "iso. Default: `qcow2`.
* **path**: Specifies output path where to store built image. Default: `/tmp`.

CLI Example:

    salt myminion inspector.build
    salt myminion inspector.build format=iso path=/opt/builds/

原文地址:https://www.cnblogs.com/randomlee/p/Saltstack_module_inspector.html

时间: 2024-08-30 09:15:15

Saltstack module inspector 详解的相关文章

Saltstack module highstate_doc 详解

highstate_doc.read_file output the contents of a file: this is a workaround if the cp.push module does not work. https://github.com/saltstack/salt/issues/37133 help the master output the contents of a document that might be saved on the minions files

Saltstack module artifactory 详解

artifactory.get_latest_snapshot Gets latest snapshot of the given artifact artifactory_url URL of artifactory instance repository Snapshot repository in artifactory to retrieve artifact from, for example: libs-snapshots group_id Group Id of the artif

Saltstack module introspect 详解

introspect.service_highstate Return running and enabled services in a highstate structure. By default also returns package dependencies for those services, which means that package definitions must be created outside this function. To drop the packag

Saltstack module http 详解

http.query New in version 2015.5.0 Query a resource, and decode the return data Passes through all the parameters described in the :py:func:`utils.http.query function <salt.utils.http.query>`: .. autofunction:: salt.utils.http.query raise_error : Tr

Saltstack module ini 详解

ini.remove_option Remove a key/value pair from a section in an ini file. Returns the value of the removed key, or ``None`` if nothing was removed. API Example: import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.remove_option', [pat

Saltstack module glassfish 详解

glassfish.update_connector_c_pool Update a connection pool glassfish.update_jdbc_resource Update a JDBC resource glassfish.enum_connector_resource Enum connection resources glassfish.delete_jdbc_resource Delete a JDBC resource glassfish.enum_connecto

Saltstack module iosconfig 详解

iosconfig.diff_text Return the diff, as text, between the candidate and the running config. candidate_config The candidate configuration sent as text. This argument is ignored when ``candidate_path`` is set. candidate_path Absolute or remote path fro

Saltstack module grafana4 详解

grafana4.get_org Show a single organization. name Name of the organization. profile Configuration profile used to connect to the Grafana instance. Default is 'grafana'. CLI Example: salt '*' grafana4.get_org <name> grafana4.delete_user Delete a user

Saltstack module genesis 详解

genesis.mksls Convert an installation file/script to an SLS file. Currently supports ``kickstart``, ``preseed``, and ``autoyast``. CLI Examples: salt <minion> genesis.mksls kickstart /path/to/kickstart.cfg salt <minion> genesis.mksls kickstart