neulab/tldr huggingface dataset:
separate_git_dir Set this argument to specify an alternate $GIT_DIR
shared Set sharing permissions on git repo. See git-init(1) for more details.
git_opts Any additional options to add to git command itself (not the init subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
salt myminion git.init /path/to/repo # Init a bare repo (before 2015.8.0) salt myminion git.init /path/to/bare/repo.git opts='--bare' # Init a bare repo (2015.8.0 and later) salt myminion git.init /path/to/bare/repo.git bare=True
salt.modules.git.is_worktree(cwd, user=None, password=None, output_encoding=None) New in version 2015.8.0.
This function will attempt to determine if cwd is part of a worktree by checking its .git to see if it is a file containing a reference to another gitdir.
cwd    path to the worktree to be removed
salt myminion git.is_worktree /path/to/repo
salt.modules.git.list_branches(cwd, remote=False, user=None, password=None, ignore_retcode=False, output_encoding=None) New in version 2015.8.0.
Return a list of branches
remote False If True, list remote branches. Otherwise, local branches will be listed.
WARNING: This option will only return remote branches of which the local checkout is aware, use git.fetch to update remotes.
salt myminion git.list_branches /path/to/repo salt myminion git.list_branches /path/to/repo remote=True
salt.modules.git.list_tags(cwd, user=None, password=None, ignore_retcode=False, output_encoding=None) New in version 2015.8.0.
Return a list of tags
salt myminion git.list_tags /path/to/repo
salt.modules.git.list_worktrees(cwd, stale=False, user=None, password=None, output_encoding=None, **kwargs) New in version 2015.8.0.
Returns information on worktrees
Changed in version 2015.8.4: Version 2.7.0 added the list subcommand to git-worktree(1) which provides a lot of additional information. The return data has been changed to include this information, even for pre-2.7.0 versions of git. In addition, if a worktree has a detached head, then any tags which point to the worktree's HEAD will be included in the return data.
NOTE: By default, only worktrees for which the worktree directory is still present are returned, but this can be changed using the all and stale arguments (described below).
all    False If True, then return all worktrees tracked under $GIT_DIR/worktrees, including ones for which the gitdir is no longer present.
stale  False If True, return only worktrees whose gitdir is no longer present.
NOTE: Only one of all and stale can be set to True.
salt myminion git.list_worktrees /path/to/repo salt myminion git.list_worktrees /path/to/repo all=True salt myminion git.list_worktrees /path/to/repo stale=True
salt.modules.git.ls_remote(cwd=None, remote='origin', ref=None, opts='', git_opts='', user=None, password=None, identity=None, https_user=None, https_pass=None, ignore_retcode=False, output_encoding=None, saltenv='base') Interface to git-ls-remote(1). Returns the upstream hash for a remote reference.
cwd    The path to the git checkout. Optional (and ignored if present) when remote is set to a URL instead of a remote name.
remote origin The name of the remote to query. Can be the name of a git remote (which exists in the git checkout defined by the cwd parameter), or the URL of a remote repository.
Changed in version 2015.8.0: Argument renamed from repository to remote
ref    The name of the ref to query. Optional, if not specified, all refs are returned. Can be a branch or tag name, or the full name of the reference (for example, to get the hash for a Github pull request number 1234, ref can be set to refs/pull/1234/head
Changed in version 2015.8.0: Argument renamed from branch to ref
Changed in version 2015.8.4: Defaults to returning all refs instead of master.
git_opts Any additional options to add to git command itself (not the ls-remote subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
salt myminion git.ls_remote /path/to/repo origin master salt myminion git.ls_remote remote=https://mydomain.tld/repo.git ref=mytag opts='--tags'
salt.modules.git.merge(cwd, rev=None, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, output_encoding=None, **kwargs) Interface to git-merge(1)
rev    Revision to merge into the current branch. If not specified, the remote tracking branch will be merged.
git_opts Any additional options to add to git command itself (not the merge subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
identity Path to a private key to use for ssh URLs. Salt will not attempt to use passphrase-protected keys unless invoked from the minion using salt-call, to prevent blocking waiting for user input. Key can also be specified as a SaltStack file server URL, eg. salt://location/identity_file.
NOTE: For greater security with passphraseless private keys, see the sshd(8) manpage for information on securing the keypair from the remote side in the authorized_keys file.
New in version 2018.3.5,2019.2.1,3000.
# Fetch first... salt myminion git.fetch /path/to/repo # ... then merge the remote tracking branch salt myminion git.merge /path/to/repo # .. or merge another rev salt myminion git.merge /path/to/repo rev=upstream/foo
salt.modules.git.merge_base(cwd, refs=None, octopus=False, is_ancestor=False, independent=False, fork_point=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs) New in version 2015.8.0.
Interface to git-merge-base(1).
refs   Any refs/commits to check for a merge base. Can be passed as a comma-separated list or a Python list.
all    False Return a list of all matching merge bases. Not compatible with any of the below options except for octopus.
octopus False If True, then this function will determine the best common ancestors of all specified commits, in preparation for an n-way merge.  See here for a description of how these bases are determined.
Set all to True with this option to return all computed merge bases, otherwise only the "best" will be returned.
is_ancestor False If True, then instead of returning the merge base, return a boolean telling whether or not the first commit is an ancestor of the second commit.
NOTE: This option requires two commits to be passed.
Changed in version 2015.8.2: Works properly in git versions older than 1.8.0, where the --is-ancestor CLI option is not present.
independent False If True, this function will return the IDs of the refs/commits passed which cannot be reached by another commit.
fork_point If passed, then this function will return the commit where the commit diverged from the ref specified by fork_point. If no fork point is found, None is returned.
NOTE: At most one commit is permitted to be passed if a fork_point is specified. If no commits are passed, then HEAD is assumed.
This option should not be necessary unless new CLI arguments are added to git-merge-base(1) and are not yet supported in Salt.
git_opts Any additional options to add to git command itself (not the merge-base subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
ignore_retcode False if True, do not log an error to the minion log if the git command returns a nonzero exit status.
salt myminion git.merge_base /path/to/repo HEAD upstream/mybranch salt myminion git.merge_base /path/to/repo 8f2e542,4ad8cab,cdc9886 octopus=True salt myminion git.merge_base /path/to/repo refs=8f2e542,4ad8cab,cdc9886 independent=True salt myminion git.merge_base /path/to/repo refs=8f2e542,4ad8cab is_ancestor=True salt myminion git.merge_base /path/to/repo fork_point=upstream/master salt myminion git.merge_base /path/to/repo refs=mybranch fork_point=upstream/master
salt.modules.git.merge_tree(cwd, ref1, ref2, base=None, user=None, password=None, ignore_retcode=False, output_encoding=None) New in version 2015.8.0.
Interface to git-merge-tree(1), shows the merge results and conflicts from a 3-way merge without touching the index.
ref1   First ref/commit to compare
ref2   Second ref/commit to compare
base   The base tree to use for the 3-way-merge. If not provided, then git.merge_base will be invoked on ref1 and ref2 to determine the merge base to use.
salt myminion git.merge_tree /path/to/repo HEAD upstream/dev salt myminion git.merge_tree /path/to/repo HEAD upstream/dev base=aaf3c3d
salt.modules.git.pull(cwd, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, saltenv='base', output_encoding=None) Interface to git-pull(1)
git_opts Any additional options to add to git command itself (not the pull subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
salt myminion git.pull /path/to/repo opts='--rebase origin master'
salt.modules.git.push(cwd, remote=None, ref=None, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, saltenv='base', output_encoding=None, **kwargs) Interface to git-push(1)
remote Name of the remote to which the ref should being pushed
ref    master Name of the ref to push
NOTE: Being a refspec, this argument can include a colon to define local and remote ref names.
git_opts Any additional options to add to git command itself (not the push subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
# Push master as origin/master salt myminion git.push /path/to/repo origin master # Push issue21 as upstream/develop salt myminion git.push /path/to/repo upstream issue21:develop # Delete remote branch 'upstream/temp' salt myminion git.push /path/to/repo upstream :temp
salt.modules.git.rebase(cwd, rev='master', opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None) Interface to git-rebase(1)
rev    master The revision to rebase onto the current branch
git_opts Any additional options to add to git command itself (not the rebase subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
salt myminion git.rebase /path/to/repo master salt myminion git.rebase /path/to/repo 'origin master' salt myminion git.rebase /path/to/repo origin/master opts='--onto newbranch'
salt.modules.git.remote_get(cwd, remote='origin', user=None, password=None, redact_auth=True, ignore_retcode=False, output_encoding=None) Get the fetch and push URL for a specific remote
remote origin Name of the remote to query
redact_auth True Set to False to include the username/password if the remote uses HTTPS Basic Auth. Otherwise, this information will be redacted.
WARNING: Setting this to False will not only reveal any HTTPS Basic Auth that is configured, but the return data will also be written to the job cache. When possible, it is recommended to use SSH for authentication.
salt myminion git.remote_get /path/to/repo salt myminion git.remote_get /path/to/repo upstream
salt.modules.git.remote_refs(url, heads=False, tags=False, user=None, password=None, identity=None, https_user=None, https_pass=None, ignore_retcode=False, output_encoding=None, saltenv='base', **kwargs) New in version 2015.8.0.
Return the remote refs for the specified URL by running git ls-remote.
url    URL of the remote repository
filter Optionally provide a ref name to git ls-remote. This can be useful to make this function run faster on repositories with many branches/tags.
heads  False Restrict output to heads. Can be combined with tags.
tags   False Restrict output to tags. Can be combined with heads.
salt myminion git.remote_refs https://github.com/saltstack/salt.git salt myminion git.remote_refs https://github.com/saltstack/salt.git filter=develop
salt.modules.git.remote_set(cwd, url, remote='origin', user=None, password=None, https_user=None, https_pass=None, push_url=None, push_https_user=None, push_https_pass=None, ignore_retcode=False, output_encoding=None)
url    Remote URL to set
remote origin Name of the remote to set
push_url If unset, the push URL will be identical to the fetch URL.
push_https_user Set HTTP Basic Auth user for push_url. Ignored if push_url is unset. Only accepted for HTTPS URLs.
push_https_pass Set HTTP Basic Auth password for push_url. Ignored if push_url is unset. Only accepted for HTTPS URLs.
salt myminion git.remote_set /path/to/repo git@github.com:user/repo.git salt myminion git.remote_set /path/to/repo git@github.com:user/repo.git remote=upstream salt myminion git.remote_set /path/to/repo https://github.com/user/repo.git remote=upstream push_url=git@github.com:user/repo.git
salt.modules.git.remotes(cwd, user=None, password=None, redact_auth=True, ignore_retcode=False, output_encoding=None) Get fetch and push URLs for each remote in a git checkout
redact_auth True Set to False to include the username/password for authenticated remotes in the return data. Otherwise, this information will be redacted.
salt myminion git.remotes /path/to/repo
salt.modules.git.reset(cwd, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, output_encoding=None) Interface to git-reset(1), returns the stdout from the git command
git_opts Any additional options to add to git command itself (not the reset subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
# Soft reset to a specific commit ID salt myminion git.reset /path/to/repo ac3ee5c # Hard reset salt myminion git.reset /path/to/repo opts='--hard origin/master'
salt.modules.git.rev_parse(cwd, rev=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None) New in version 2015.8.0.
Interface to git-rev-parse(1)
rev    Revision to parse. See the SPECIFYING REVISIONS section of the git-rev-parse(1) manpage for details on how to format this argument.
This argument is optional when using the options in the Options for Files section of the git-rev-parse(1) manpage.
git_opts Any additional options to add to git command itself (not the rev-parse subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
# Get the full SHA1 for HEAD salt myminion git.rev_parse /path/to/repo HEAD # Get the short SHA1 for HEAD salt myminion git.rev_parse /path/to/repo HEAD opts='--short' # Get the develop branch's upstream tracking branch salt myminion git.rev_parse /path/to/repo 'develop@{upstream}' opts='--abbrev-ref' # Get the SHA1 for the commit corresponding to tag v1.2.3 salt myminion git.rev_parse /path/to/repo 'v1.2.3^{commit}' # Find out whether or not the repo at /path/to/repo is a bare repository salt myminion git.rev_parse /path/to/repo opts='--is-bare-repository'
salt.modules.git.revision(cwd, rev='HEAD', short=False, user=None, password=None, ignore_retcode=False, output_encoding=None) Returns the SHA1 hash of a given identifier (hash, branch, tag, HEAD, etc.)
rev    HEAD The revision
short  False If True, return an abbreviated SHA1 git hash
salt myminion git.revision /path/to/repo mybranch
salt.modules.git.rm_(cwd, filename, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None) Interface to git-rm(1)
filename The location of the file/directory to remove, relative to cwd
NOTE: To remove a directory, -r must be part of the opts parameter.
git_opts Any additional options to add to git command itself (not the rm subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
salt myminion git.rm /path/to/repo foo/bar.py salt myminion git.rm /path/to/repo foo/bar.py opts='--dry-run' salt myminion git.rm /path/to/repo foo/baz opts='-r'
salt.modules.git.stash(cwd, action='save', opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None) Interface to git-stash(1), returns the stdout from the git command
opts   Any additional options to add to the command line, in a single string.  Use this to complete the git stash command by adding the remaining arguments (i.e.  'save <stash comment>', 'apply stash@{2}', 'show', etc.).  Omitting this argument will simply run git stash.
git_opts Any additional options to add to git command itself (not the stash subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
salt myminion git.stash /path/to/repo save opts='work in progress' salt myminion git.stash /path/to/repo apply opts='stash@{1}' salt myminion git.stash /path/to/repo drop opts='stash@{1}' salt myminion git.stash /path/to/repo list
salt.modules.git.status(cwd, user=None, password=None, ignore_retcode=False, output_encoding=None) Changed in version 2015.8.0: Return data has changed from a list of lists to a dictionary
Returns the changes to the repository
salt myminion git.status /path/to/repo
salt.modules.git.submodule(cwd, command, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, saltenv='base', output_encoding=None, **kwargs) Changed in version 2015.8.0: Added the command argument to allow for operations other than update to be run on submodules, and deprecated the init argument. To do a submodule update with init=True moving forward, use command=update opts='--init'
Interface to git-submodule(1)
cwd    The path to the submodule
command Submodule command to run, see git-submodule(1) <git submodule> for more information. Any additional arguments after the command (such as the URL when adding a submodule) must be passed in the opts parameter.
git_opts Any additional options to add to git command itself (not the submodule subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
init   False If True, ensures that new submodules are initialized
Deprecated since version 2015.8.0: Pass init as the command parameter, or include --init in the opts param with command set to update.
# Update submodule and ensure it is initialized (before 2015.8.0) salt myminion git.submodule /path/to/repo/sub/repo init=True # Update submodule and ensure it is initialized (2015.8.0 and later) salt myminion git.submodule /path/to/repo/sub/repo update opts='--init'
# Rebase submodule (2015.8.0 and later) salt myminion git.submodule /path/to/repo/sub/repo update opts='--rebase'
# Add submodule (2015.8.0 and later) salt myminion git.submodule /path/to/repo/sub/repo add opts='https://mydomain.tld/repo.git'
# Unregister submodule (2015.8.0 and later) salt myminion git.submodule /path/to/repo/sub/repo deinit
salt.modules.git.symbolic_ref(cwd, ref, value=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None) New in version 2015.8.0.
Interface to git-symbolic-ref(1)
ref    Symbolic ref to read/modify
value  If passed, then the symbolic ref will be set to this value and an empty string will be returned.
If not passed, then the ref to which ref points will be returned, unless --delete is included in opts (in which case the symbolic ref will be deleted).
git_opts Any additional options to add to git command itself (not the symbolic-refs subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
# Get ref to which HEAD is pointing salt myminion git.symbolic_ref /path/to/repo HEAD # Set/overwrite symbolic ref 'FOO' to local branch 'foo' salt myminion git.symbolic_ref /path/to/repo FOO refs/heads/foo # Delete symbolic ref 'FOO' salt myminion git.symbolic_ref /path/to/repo FOO opts='--delete'
salt.modules.git.tag(cwd, name, ref='HEAD', message=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None) New in version 2018.3.4.
Interface to git-tag(1), adds and removes tags.
cwd    The path to the main git checkout or a linked worktree
name   Name of the tag
ref    HEAD Which ref to tag (defaults to local clone's HEAD)
NOTE: This argument is ignored when either -d or --delete is present in the opts passed to this function.
message Optional message to include with the tag. If provided, an annotated tag will be created.
NOTE: Additionally, on the Salt CLI, if the opts are preceded with a dash, it is necessary to precede them with opts= (as in the CLI examples below) to avoid causing errors with Salt's own argument parsing.
git_opts Any additional options to add to git command itself (not the worktree subcommand), in a single string. This is useful for passing -c to run git with temporary changes to the git configuration.
# Create an non-annotated tag salt myminion git.tag /path/to/repo v1.2 # Create an annotated tag salt myminion git.tag /path/to/repo v1.2 message='Version 1.2' # Delete the tag salt myminion git.tag /path/to/repo v1.2 opts='-d'
salt.modules.git.version(versioninfo=False) New in version 2015.8.0.
Returns the version of Git installed on the minion
versioninfo False If True, return the version in a versioninfo list (e.g. [2, 5, 0])
salt myminion git.version
salt.modules.git.worktree_add(cwd, worktree_path, ref=None, reset_branch=None, force=None, detach=False, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs) New in version 2015.8.0.
Interface to git-worktree(1), adds a worktree
worktree_path Path to the new worktree. Can be either absolute, or relative to cwd.
branch Name of new branch to create. If omitted, will be set to the basename of the worktree_path. For example, if the worktree_path is /foo/bar/baz, then branch will be baz.
ref    Name of the ref on which to base the new worktree. If omitted, then HEAD is use, and a new branch will be created, named for the basename of the worktree_path. For example, if the worktree_path is /foo/bar/baz then a new branch baz will be created, and pointed at HEAD.
reset_branch False If False, then git-worktree(1) will fail to create the worktree if the targeted branch already exists. Set this argument to True to reset the targeted branch to point at ref, and checkout the newly-reset branch into the new worktree.
force  False By default, git-worktree(1) will not permit the same branch to be checked out in more than one worktree. Set this argument to True to override this.
NOTE: On the Salt CLI, if the opts are preceded with a dash, it is necessary to precede them with opts= to avoid causing errors with Salt's own argument parsing.
All CLI options for adding worktrees as of Git 2.5.0 are already supported by this function as of Salt 2015.8.0, so using this argument is unnecessary unless new CLI arguments are added to git-worktree(1) and are not yet supported in Salt.
salt myminion git.worktree_add /path/to/repo/main ../hotfix ref=origin/master salt myminion git.worktree_add /path/to/repo/main ../hotfix branch=hotfix21 ref=v2.1.9.3
salt.modules.git.worktree_prune(cwd, dry_run=False, verbose=True, expire=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None) New in version 2015.8.0.
Interface to git-worktree(1), prunes stale worktree administrative data from the gitdir
dry_run False If True, then this function will report what would have been pruned, but no changes will be made.
verbose True Report all changes made. Set to False to suppress this output.
expire Only prune unused worktree data older than a specific period of time.  The date format for this parameter is described in the documentation for the gc.pruneWorktreesExpire config param in the git-config(1) manpage.
All CLI options for pruning worktrees as of Git 2.5.0 are already supported by this function as of Salt 2015.8.0, so using this argument is unnecessary unless new CLI arguments are added to git-worktree(1) and are not yet supported in Salt.
salt myminion git.worktree_prune /path/to/repo salt myminion git.worktree_prune /path/to/repo dry_run=True salt myminion git.worktree_prune /path/to/repo expire=1.day.ago
salt.modules.git.worktree_rm(cwd, user=None, output_encoding=None) New in version 2015.8.0.
Recursively removes the worktree located at cwd, returning True if successful. This function will attempt to determine if cwd is actually a worktree by invoking git.is_worktree. If the path does not correspond to a worktree, then an error will be raised and no action will be taken.
WARNING: There is no undoing this action. Be VERY careful before running this function.
cwd    Path to the worktree to be removed
user   Used for path expansion when cwd is not an absolute path. By default, when cwd is not absolute, the path will be assumed to be relative to the home directory of the user under which the minion is running. Setting this option will change the home directory from which path expansion is performed.
salt myminion git.worktree_rm /path/to/worktree
salt.modules.github Module for interacting with the GitHub v3 API.
depends PyGithub python module
Configuration Configure this module by specifying the name of a configuration profile in the minion config, minion pillar, or master config. The module will use the 'github' key by default, if defined.
github: token: abc1234 org_name: my_organization
# optional: some functions require a repo_name, which # can be set in the config file, or passed in at the CLI. repo_name: my_repo
# optional: it can be dangerous to change the privacy of a repository # in an automated way. set this to True to allow privacy modifications allow_repo_privacy_changes: False
salt.modules.github.add_repo(name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, auto_init=None, gitignore_template=None, license_template=None, profile='github') Create a new github repository.
name   The name of the team to be created.
description The description of the repository.
homepage The URL with more information about the repository.
private The visiblity of the repository. Note that private repositories require a paid GitHub account.
has_issues Whether to enable issues for this repository.
has_wiki Whether to enable the wiki for this repository.
has_downloads Whether to enable downloads for this repository.
auto_init Whether to create an initial commit with an empty README.
gitignore_template The desired language or platform for a .gitignore, e.g "Haskell".
license_template The desired LICENSE template to apply, e.g "mit" or "mozilla".
profile The name of the profile configuration to use. Defaults to github.
salt myminion github.add_repo 'repo_name'
salt.modules.github.add_team(name, description=None, repo_names=None, privacy=None, permission=None, profile='github') Create a new Github team within an organization.
description The description of the team.
repo_names The names of repositories to add the team to.
privacy The level of privacy for the team, can be 'secret' or 'closed'.
permission The default permission for new repositories added to the team, can be 'pull', 'push' or 'admin'.
salt myminion github.add_team 'team_name'
salt.modules.github.add_team_member(name, team_name, profile='github') Adds a team member to a team with team_name.
name   The name of the team member to add.
team_name The name of the team of which to add the user.
salt myminion github.add_team_member 'user_name' 'team_name'
salt.modules.github.add_team_repo(repo_name, team_name, profile='github', permission=None) Adds a repository to a team with team_name.
repo_name The name of the repository to add.
team_name The name of the team of which to add the repository.
permission The permission for team members within the repository, can be 'pull', 'push' or 'admin'. If not specified, the default permission specified on the team will be used.
salt myminion github.add_team_repo 'my_repo' 'team_name'
salt.modules.github.add_user(name, profile='github') Add a GitHub user.
name   The user for which to obtain information.
salt myminion github.add_user github-handle
salt.modules.github.edit_repo(name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, profile='github') Updates an existing Github repository.
salt.modules.github.edit_team(name, description=None, privacy=None, permission=None, profile='github') Updates an existing Github team.
name   The name of the team to be edited.
salt myminion github.edit_team 'team_name' description='Team description'
salt.modules.github.get_issue(issue_number, repo_name=None, profile='github', output='min') Return information about a single issue in a named repository.
issue_number The number of the issue to retrieve.
repo_name The name of the repository from which to get the issue. This argument is required, either passed via the CLI, or defined in the configured profile. A repo_name passed as a CLI argument will override the repo_name defined in the configured profile, if provided.
output The amount of data returned by each issue. Defaults to min. Change to full to see all issue output.
salt myminion github.get_issue 514 salt myminion github.get_issue 514 repo_name=salt
salt.modules.github.get_issue_comments(issue_number, repo_name=None, profile='github', since=None, output='min') Return information about the comments for a given issue in a named repository.
issue_number The number of the issue for which to retrieve comments.
repo_name The name of the repository to which the issue belongs. This argument is required, either passed via the CLI, or defined in the configured profile. A repo_name passed as a CLI argument will override the repo_name defined in the configured profile, if provided.
since  Only comments updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
salt myminion github.get_issue_comments 514 salt myminion github.get_issue 514 repo_name=salt
salt.modules.github.get_issues(repo_name=None, profile='github', milestone=None, state='open', assignee=None, creator=None, mentioned=None, labels=None, sort='created', direction='desc', since=None, output='min', per_page=None) Returns information for all issues in a given repository, based on the search options.
repo_name The name of the repository for which to list issues. This argument is required, either passed via the CLI, or defined in the configured profile. A repo_name passed as a CLI argument will override the repo_name defined in the configured profile, if provided.
milestone The number of a GitHub milestone, or a string of either * or none.
If a number is passed, it should refer to a milestone by its number field. Use the github.get_milestone function to obtain a milestone's number.
If the string * is passed, issues with any milestone are accepted. If the string none is passed, issues without milestones are returned.
state  Indicates the state of the issues to return. Can be either open, closed, or all. Default is open.
assignee Can be the name of a user. Pass in none (as a string) for issues with no assigned user or * for issues assigned to any user.
creator The user that created the issue.
mentioned A user that's mentioned in the issue.
labels A string of comma separated label names. For example, bug,ui,@high.
sort   What to sort results by. Can be either created, updated, or comments. Default is created.
direction The direction of the sort. Can be either asc or desc. Default is desc.
since  Only issues updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_page GitHub paginates data in their API calls. Use this value to increase or decrease the number of issues gathered from GitHub, per page. If not set, GitHub defaults are used. Maximum is 100.
salt myminion github.get_issues my-github-repo
salt.modules.github.get_milestone(number=None, name=None, repo_name=None, profile='github', output='min') Return information about a single milestone in a named repository.
number The number of the milestone to retrieve. If provided, this option will be favored over name.
name   The name of the milestone to retrieve.
salt myminion github.get_milestone 72 salt myminion github.get_milestone name=my_milestone
salt.modules.github.get_milestones(repo_name=None, profile='github', state='open', sort='due_on', direction='asc', output='min', per_page=None) Return information about milestones for a given repository.
state  The state of the milestone. Either open, closed, or all. Default is open.
sort   What to sort results by. Either due_on or completeness. Default is due_on.
direction The direction of the sort. Either asc or desc. Default is asc.
per_page GitHub paginates data in their API calls. Use this value to increase or decrease the number of issues gathered from GitHub, per page. If not set, GitHub defaults are used.
salt myminion github.get_milestones
salt.modules.github.get_prs(repo_name=None, profile='github', state='open', head=None, base=None, sort='created', direction='desc', output='min', per_page=None) Returns information for all pull requests in a given repository, based on the search options provided.
repo_name The name of the repository for which to list pull requests. This argument is required, either passed via the CLI, or defined in the configured profile. A repo_name passed as a CLI argument will override the repo_name defined in the configured profile, if provided.
state  Indicates the state of the pull requests to return. Can be either open, closed, or all. Default is open.
head   Filter pull requests by head user and branch name in the format of user:ref-name. Example: 'github:new-script-format'. Default is None.
base   Filter pulls by base branch name. Example: gh-pages. Default is None.
sort   What to sort results by. Can be either created, updated, popularity (comment count), or long-running (age, filtering by pull requests updated within the last month). Default is created.
output The amount of data returned by each pull request. Defaults to min.  Change to full to see all pull request output.
per_page GitHub paginates data in their API calls. Use this value to increase or decrease the number of pull requests gathered from GitHub, per page. If not set, GitHub defaults are used. Maximum is 100.
salt myminion github.get_prs salt myminion github.get_prs base=2016.11
salt.modules.github.get_repo_info(repo_name, profile='github', ignore_cache=False) Return information for a given repo.
repo_name The name of the repository.
salt myminion github.get_repo_info salt salt myminion github.get_repo_info salt profile='my-github-profile'
salt.modules.github.get_repo_teams(repo_name, profile='github') Return teams belonging to a repository.
repo_name The name of the repository from which to retrieve teams.
salt myminion github.get_repo_teams salt salt myminion github.get_repo_teams salt profile='my-github-profile'
salt.modules.github.get_team(name, profile='github') Returns the team details if a team with the given name exists, or None otherwise.
name   The team name for which to obtain information.
salt myminion github.get_team 'team_name'
salt.modules.github.get_user(name, profile='github', user_details=False) Get a GitHub user by name.
user_details Prints user information details. Defaults to False. If the user is already in the organization and user_details is set to False, the get_user function returns True. If the user is not already present in the organization, user details will be printed by default.
salt myminion github.get_user github-handle salt myminion github.get_user github-handle user_details=true
salt.modules.github.is_team_member(name, team_name, profile='github') Returns True if the github user is in the team with team_name, or False otherwise.
name   The name of the user whose membership to check.
team_name The name of the team to check membership in.
salt myminion github.is_team_member 'user_name' 'team_name'
salt.modules.github.list_members_without_mfa(profile='github', ignore_cache=False) List all members (in lower case) without MFA turned on.
ignore_cache Bypasses the use of cached team repos.
salt myminion github.list_members_without_mfa
salt.modules.github.list_private_repos(profile='github') List private repositories within the organization. Dependent upon the access rights of the profile token.
salt myminion github.list_private_repos salt myminion github.list_private_repos profile='my-github-profile'
salt.modules.github.list_public_repos(profile='github') List public repositories within the organization.
salt myminion github.list_public_repos salt myminion github.list_public_repos profile='my-github-profile'
salt.modules.github.list_repos(profile='github') List all repositories within the organization. Includes public and private repositories within the organization Dependent upon the access rights of the profile token.
salt myminion github.list_repos salt myminion github.list_repos profile='my-github-profile'
salt.modules.github.list_team_members(team_name, profile='github', ignore_cache=False) Gets the names of team members in lower case.
team_name The name of the team from which to list members.
ignore_cache Bypasses the use of cached team members.
salt myminion github.list_team_members 'team_name'
salt.modules.github.list_team_repos(team_name, profile='github', ignore_cache=False) Gets the repo details for a given team as a dict from repo_name to repo details.  Note that repo names are always in lower case.
team_name The name of the team from which to list repos.
salt myminion github.list_team_repos 'team_name'
salt.modules.github.list_teams(profile='github', ignore_cache=False) Lists all teams with the organization.
ignore_cache Bypasses the use of cached teams.
salt myminion github.list_teams
salt.modules.github.list_users(profile='github', ignore_cache=False) List all users within the organization.
ignore_cache Bypasses the use of cached users.
salt myminion github.list_users salt myminion github.list_users profile='my-github-profile'
salt.modules.github.remove_repo(name, profile='github') Remove a Github repository.
name   The name of the repository to be removed.
salt myminion github.remove_repo 'my-repo'
salt.modules.github.remove_team(name, profile='github') Remove a github team.
name   The name of the team to be removed.
salt myminion github.remove_team 'team_name'
salt.modules.github.remove_team_member(name, team_name, profile='github') Removes a team member from a team with team_name.
name   The name of the team member to remove.
team_name The name of the team from which to remove the user.
salt myminion github.remove_team_member 'user_name' 'team_name'
salt.modules.github.remove_team_repo(repo_name, team_name, profile='github') Removes a repository from a team with team_name.
repo_name The name of the repository to remove.
team_name The name of the team of which to remove the repository.
salt myminion github.remove_team_repo 'my_repo' 'team_name'
salt.modules.github.remove_user(name, profile='github') Remove a Github user by name.
salt myminion github.remove_user github-handle
salt.modules.glanceng Glance module for interacting with OpenStack Glance
:depends:shade
glance: cloud: default
glance: auth: username: admin password: password123 user_domain_name: mydomain project_name: myproject project_domain_name: myproject auth_url: https://example.org:5000/v3 identity_api_version: 3
salt.modules.glanceng.compare_changes(obj, **kwargs) Compare two dicts returning only keys that exist in the first dict and are different in the second one
salt.modules.glanceng.get_openstack_cloud(auth=None) Return an openstack_cloud
salt.modules.glanceng.get_operator_cloud(auth=None) Return an operator_cloud
salt.modules.glanceng.image_create(auth=None, **kwargs) Create an image
salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw hw_scsi_model=virtio-scsi hw_disk_bus=scsi
salt.modules.glanceng.image_delete(auth=None, **kwargs) Delete an image
salt '*' glanceng.image_delete name=image1 salt '*' glanceng.image_delete name=0e4febc2a5ab4f2c8f374b054162506d
salt.modules.glanceng.image_get(auth=None, **kwargs) Get a single image
salt '*' glanceng.image_get name=image1 salt '*' glanceng.image_get name=0e4febc2a5ab4f2c8f374b054162506d
salt.modules.glanceng.image_list(auth=None, **kwargs) List images
salt '*' glanceng.image_list salt '*' glanceng.image_list
salt.modules.glanceng.image_search(auth=None, **kwargs) Search for images
salt '*' glanceng.image_search name=image1 salt '*' glanceng.image_search
salt.modules.glanceng.setup_clouds(auth=None) Call functions to create Shade cloud objects in __context__ to take advantage of Shade's in-memory caching across several states
salt.modules.glanceng.update_image_properties(auth=None, **kwargs) Update properties for an image
salt '*' glanceng.update_image_properties name=image1 hw_scsi_model=virtio-scsi hw_disk_bus=scsi salt '*' glanceng.update_image_properties name=0e4febc2a5ab4f2c8f374b054162506d min_ram=1024
salt.modules.glassfish Module for working with the Glassfish/Payara 4.x management API .. versionadded:: 2016.11.0 :depends: requests
salt.modules.glassfish.create_admin_object_resource(name, server=None, **kwargs) Create a JMS destination
salt.modules.glassfish.create_connector_c_pool(name, server=None, **kwargs) Create a connection pool
salt.modules.glassfish.create_connector_resource(name, server=None, **kwargs) Create a connection resource
salt.modules.glassfish.create_jdbc_connection_pool(name, server=None, **kwargs) Create a connection resource
salt.modules.glassfish.create_jdbc_resource(name, server=None, **kwargs) Create a JDBC resource
salt.modules.glassfish.delete_admin_object_resource(name, target='server', server=None) Delete a JMS destination
salt.modules.glassfish.delete_connector_c_pool(name, target='server', cascade=True, server=None) Delete a connection pool
salt.modules.glassfish.delete_connector_resource(name, target='server', server=None) Delete a connection resource
salt.modules.glassfish.delete_jdbc_connection_pool(name, target='server', cascade=False, server=None) Delete a JDBC pool
salt.modules.glassfish.delete_jdbc_resource(name, target='server', server=None) Delete a JDBC resource
salt.modules.glassfish.delete_system_properties(name, server=None) Delete a system property
salt.modules.glassfish.enum_admin_object_resource(server=None) Enum JMS destinations
salt.modules.glassfish.enum_connector_c_pool(server=None) Enum connection pools
salt.modules.glassfish.enum_connector_resource(server=None) Enum connection resources
salt.modules.glassfish.enum_jdbc_connection_pool(server=None) Enum JDBC pools
salt.modules.glassfish.enum_jdbc_resource(server=None) Enum JDBC resources
salt.modules.glassfish.get_admin_object_resource(name, server=None) Get a specific JMS destination
salt.modules.glassfish.get_connector_c_pool(name, server=None) Get a specific connection pool
salt.modules.glassfish.get_connector_resource(name, server=None) Get a specific connection resource
salt.modules.glassfish.get_jdbc_connection_pool(name, server=None) Get a specific JDBC pool
salt.modules.glassfish.get_jdbc_resource(name, server=None) Get a specific JDBC resource
salt.modules.glassfish.get_system_properties(server=None) Get system properties
salt.modules.glassfish.update_admin_object_resource(name, server=None, **kwargs) Update a JMS destination
salt.modules.glassfish.update_connector_c_pool(name, server=None, **kwargs) Update a connection pool
salt.modules.glassfish.update_connector_resource(name, server=None, **kwargs) Update a connection resource
salt.modules.glassfish.update_jdbc_connection_pool(name, server=None, **kwargs) Update a JDBC pool
salt.modules.glassfish.update_jdbc_resource(name, server=None, **kwargs) Update a JDBC resource
salt.modules.glassfish.update_system_properties(data, server=None) Update system properties
salt.modules.glusterfs Manage a glusterfs pool
salt.modules.glusterfs.add_volume_bricks(name, bricks) Add brick(s) to an existing volume
name   Volume name
bricks List of bricks to add to the volume
salt '*' glusterfs.add_volume_bricks <volume> <bricks>
salt.modules.glusterfs.create_volume(name, bricks, stripe=False, replica=False, device_vg=False, transport='tcp', start=False, force=False, arbiter=False) Create a glusterfs volume
name   Name of the gluster volume
bricks Bricks to create volume from, in <peer>:<brick path> format. For         multiple bricks use list format: '["<peer1>:<brick1>",         "<peer2>:<brick2>"]'
stripe Stripe count, the number of bricks should be a multiple of the stripe         count for a distributed striped volume
replica Replica count, the number of bricks should be a multiple of the         replica count for a distributed replicated volume
arbiter If true, specifies volume should use arbiter brick(s). Valid configuration limited to "replica 3 arbiter 1" per Gluster documentation. Every third brick in the brick list is used as an arbiter brick.
device_vg If true, specifies volume should use block backend instead of regular         posix backend. Block device backend volume does not support multiple         bricks
transport Transport protocol to use, can be 'tcp', 'rdma' or 'tcp,rdma'
start  Start the volume after creation
force  Force volume creation, this works even if creating in root FS
salt host1 glusterfs.create newvolume host1:/brick
salt gluster1 glusterfs.create vol2 '["gluster1:/export/vol2/brick",         "gluster2:/export/vol2/brick"]' replica=2 start=True
salt.modules.glusterfs.delete_volume(target, stop=True) Deletes a gluster volume
target Volume to delete
stop   True If True, stop volume before delete
salt '*' glusterfs.delete_volume <volume>
salt.modules.glusterfs.disable_quota_volume(name) Disable quota on a glusterfs volume.
salt '*' glusterfs.disable_quota_volume <volume>
salt.modules.glusterfs.enable_quota_volume(name) Enable quota on a glusterfs volume.
salt '*' glusterfs.enable_quota_volume <volume>
salt.modules.glusterfs.get_max_op_version() New in version 2019.2.0.
Returns the glusterfs volume's max op-version value Requires Glusterfs version > 3.9
salt '*' glusterfs.get_max_op_version
salt.modules.glusterfs.get_op_version(name) New in version 2019.2.0.
Returns the glusterfs volume op-version
name   Name of the glusterfs volume
salt '*' glusterfs.get_op_version <volume>
salt.modules.glusterfs.get_version() New in version 2019.2.0.
Returns the version of glusterfs.
salt '*' glusterfs.get_version
salt.modules.glusterfs.info(name=None) New in version 2015.8.4.
Return gluster volume info.
name   Optional name to retrieve only information of one volume
salt '*' glusterfs.info
salt.modules.glusterfs.list_quota_volume(name) List quotas of glusterfs volume
salt '*' glusterfs.list_quota_volume <volume>
salt.modules.glusterfs.list_volumes() List configured volumes
salt '*' glusterfs.list_volumes
salt.modules.glusterfs.peer(name) Add another node into the peer list.
name   The remote host to probe.
salt 'one.gluster.*' glusterfs.peer two
GLUSTER direct CLI example (to show what salt is sending to gluster): $ gluster peer probe ftp2
GLUSTER CLI 3.4.4 return example (so we know what we are parsing): #if the "peer" is the local host: peer probe: success: on localhost not needed
#if the peer was just added: peer probe: success
#if the peer was already part of the cluster: peer probe: success: host ftp2 port 24007 already in peer list
salt.modules.glusterfs.peer_status() Return peer status information
The return value is a dictionary with peer UUIDs as keys and dicts of peer information as values. Hostnames are listed in one list. GlusterFS separates one of the hostnames but the only reason for this seems to be which hostname happens to be used first in peering.
salt '*' glusterfs.peer_status
GLUSTER direct CLI example (to show what salt is sending to gluster): $ gluster peer status
GLUSTER CLI 3.4.4 return example (so we know what we are parsing): Number of Peers: 2
Hostname: ftp2 Port: 24007 Uuid: cbcb256b-e66e-4ec7-a718-21082d396c24 State: Peer in Cluster (Connected)
Hostname: ftp3 Uuid: 5ea10457-6cb2-427b-a770-7897509625e9 State: Peer in Cluster (Connected)
salt.modules.glusterfs.set_op_version(version) New in version 2019.2.0.
Set the glusterfs volume op-version
version Version to set the glusterfs volume op-version
salt '*' glusterfs.set_op_version <volume>
salt.modules.glusterfs.set_quota_volume(name, path, size, enable_quota=False) Set quota to glusterfs volume.
path   Folder path for restriction in volume ("/")
size   Hard-limit size of the volume (MB/GB)
enable_quota Enable quota before set up restriction
salt '*' glusterfs.set_quota_volume <volume> <path> <size> enable_quota=True
salt.modules.glusterfs.start_volume(name, force=False) Start a gluster volume
force  Force the volume start even if the volume is started .. versionadded:: 2015.8.4
salt '*' glusterfs.start mycluster
salt.modules.glusterfs.status(name) Check the status of a gluster volume.