mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
(cherry picked from commit ddc989ec6d
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
c5ff49db56
commit
5a2e7f9b1b
38 changed files with 242 additions and 228 deletions
|
@ -25,12 +25,12 @@ options:
|
|||
description:
|
||||
- Install packages from local cache, if the packages were installed before
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: false
|
||||
production:
|
||||
description:
|
||||
- Install with --production flag
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: false
|
||||
path:
|
||||
type: path
|
||||
description:
|
||||
|
@ -80,7 +80,7 @@ EXAMPLES = '''
|
|||
- npm:
|
||||
path: /app/location
|
||||
name: bower
|
||||
global: no
|
||||
global: false
|
||||
- community.general.bower:
|
||||
path: /app/location
|
||||
relative_execpath: node_modules/.bin
|
||||
|
|
|
@ -45,7 +45,7 @@ options:
|
|||
- Only applies if state is C(present). If set removes any gems on the
|
||||
target host that are not in the gemfile
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: false
|
||||
gemfile:
|
||||
type: path
|
||||
description:
|
||||
|
@ -55,19 +55,19 @@ options:
|
|||
description:
|
||||
- If set only installs gems from the cache on the target host
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: false
|
||||
deployment_mode:
|
||||
description:
|
||||
- Only applies if state is C(present). If set it will install gems in
|
||||
./vendor/bundle instead of the default location. Requires a Gemfile.lock
|
||||
file to have been created prior
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: false
|
||||
user_install:
|
||||
description:
|
||||
- Only applies if state is C(present). Installs gems in the local user's cache or for all users
|
||||
type: bool
|
||||
default: 'yes'
|
||||
default: true
|
||||
gem_path:
|
||||
type: path
|
||||
description:
|
||||
|
@ -106,7 +106,7 @@ EXAMPLES = '''
|
|||
- name: Install gems into ./vendor/bundle
|
||||
community.general.bundler:
|
||||
state: present
|
||||
deployment_mode: yes
|
||||
deployment_mode: true
|
||||
|
||||
- name: Install gems using a Gemfile in another directory
|
||||
community.general.bundler:
|
||||
|
|
|
@ -126,12 +126,12 @@ EXAMPLES = '''
|
|||
command: create-project
|
||||
arguments: package/package /path/to/project ~1.0
|
||||
working_dir: /path/to/project
|
||||
prefer_dist: yes
|
||||
prefer_dist: true
|
||||
|
||||
- name: Install a package globally
|
||||
community.general.composer:
|
||||
command: require
|
||||
global_command: yes
|
||||
global_command: true
|
||||
arguments: my/package
|
||||
'''
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ options:
|
|||
description:
|
||||
- Do not run unit tests.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
locallib:
|
||||
description:
|
||||
- Specify the install base to install modules.
|
||||
|
@ -44,12 +44,12 @@ options:
|
|||
description:
|
||||
- Use the mirror's index file instead of the CPAN Meta DB.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
installdeps:
|
||||
description:
|
||||
- Only install dependencies.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version:
|
||||
description:
|
||||
- Version specification for the perl module. When I(mode) is C(new), C(cpanm) version operators are accepted.
|
||||
|
@ -122,7 +122,7 @@ EXAMPLES = '''
|
|||
mirror: 'http://cpan.cpantesters.org/'
|
||||
|
||||
- name: Install Dancer perl package into the system root path
|
||||
become: yes
|
||||
become: true
|
||||
community.general.cpanm:
|
||||
name: Dancer
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ options:
|
|||
have any effect, the environment must be deleted and newly
|
||||
created.
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: false
|
||||
virtualenv_command:
|
||||
type: str
|
||||
description:
|
||||
|
|
|
@ -38,7 +38,7 @@ options:
|
|||
- Whether to include dependencies or not.
|
||||
required: false
|
||||
type: bool
|
||||
default: "yes"
|
||||
default: true
|
||||
repository:
|
||||
type: str
|
||||
description:
|
||||
|
@ -50,7 +50,7 @@ options:
|
|||
- Install gem in user's local gems cache or for all users
|
||||
required: false
|
||||
type: bool
|
||||
default: "yes"
|
||||
default: true
|
||||
executable:
|
||||
type: path
|
||||
description:
|
||||
|
@ -80,7 +80,7 @@ options:
|
|||
description:
|
||||
- Rewrite the shebang line on installed scripts to use /usr/bin/env.
|
||||
required: false
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
version:
|
||||
type: str
|
||||
|
@ -91,13 +91,13 @@ options:
|
|||
description:
|
||||
- Allow installation of pre-release versions of the gem.
|
||||
required: false
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
include_doc:
|
||||
description:
|
||||
- Install with or without docs.
|
||||
required: false
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
build_flags:
|
||||
type: str
|
||||
|
@ -108,7 +108,7 @@ options:
|
|||
description:
|
||||
- Force gem to install, bypassing dependency checks.
|
||||
required: false
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
author:
|
||||
- "Ansible Core Team"
|
||||
|
|
|
@ -83,7 +83,7 @@ options:
|
|||
responds to an initial request with a 401 status. Since some basic auth services do not properly
|
||||
send a 401, logins will fail. This option forces the sending of the Basic authentication header
|
||||
upon initial request.
|
||||
default: 'no'
|
||||
default: false
|
||||
type: bool
|
||||
version_added: '0.2.0'
|
||||
dest:
|
||||
|
@ -105,9 +105,9 @@ options:
|
|||
default: 10
|
||||
validate_certs:
|
||||
description:
|
||||
- If C(no), SSL certificates will not be validated. This should only be set to C(no) when no other option exists.
|
||||
- If C(false), SSL certificates will not be validated. This should only be set to C(false) when no other option exists.
|
||||
type: bool
|
||||
default: 'yes'
|
||||
default: true
|
||||
client_cert:
|
||||
description:
|
||||
- PEM formatted certificate chain file to be used for SSL client authentication.
|
||||
|
@ -122,11 +122,11 @@ options:
|
|||
version_added: '1.3.0'
|
||||
keep_name:
|
||||
description:
|
||||
- If C(yes), the downloaded artifact's name is preserved, i.e the version number remains part of it.
|
||||
- If C(true), the downloaded artifact's name is preserved, i.e the version number remains part of it.
|
||||
- This option only has effect when C(dest) is a directory and C(version) is set to C(latest) or C(version_by_spec)
|
||||
is defined.
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: false
|
||||
verify_checksum:
|
||||
type: str
|
||||
description:
|
||||
|
@ -214,7 +214,7 @@ EXAMPLES = '''
|
|||
artifact_id: spring-core
|
||||
group_id: org.springframework
|
||||
dest: /tmp/
|
||||
keep_name: yes
|
||||
keep_name: true
|
||||
|
||||
- name: Download the latest version of the JUnit framework artifact from Maven local
|
||||
community.general.maven_artifact:
|
||||
|
|
|
@ -35,7 +35,7 @@ options:
|
|||
description:
|
||||
- Install the node.js library globally.
|
||||
required: false
|
||||
default: no
|
||||
default: false
|
||||
type: bool
|
||||
executable:
|
||||
description:
|
||||
|
@ -48,23 +48,23 @@ options:
|
|||
- Use the C(--ignore-scripts) flag when installing.
|
||||
required: false
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
unsafe_perm:
|
||||
description:
|
||||
- Use the C(--unsafe-perm) flag when installing.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
ci:
|
||||
description:
|
||||
- Install packages based on package-lock file, same as running C(npm ci).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
production:
|
||||
description:
|
||||
- Install dependencies in production mode, excluding devDependencies.
|
||||
required: false
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
registry:
|
||||
description:
|
||||
- The registry to install modules from.
|
||||
|
@ -81,13 +81,13 @@ options:
|
|||
description:
|
||||
- Use the C(--no-optional) flag when installing.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version_added: 2.0.0
|
||||
no_bin_links:
|
||||
description:
|
||||
- Use the C(--no-bin-links) flag when installing.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version_added: 2.5.0
|
||||
requirements:
|
||||
- npm installed in bin path (recommended /usr/local/bin)
|
||||
|
@ -108,12 +108,12 @@ EXAMPLES = r'''
|
|||
- name: Install "coffee-script" node.js package globally.
|
||||
community.general.npm:
|
||||
name: coffee-script
|
||||
global: yes
|
||||
global: true
|
||||
|
||||
- name: Remove the globally package "coffee-script".
|
||||
community.general.npm:
|
||||
name: coffee-script
|
||||
global: yes
|
||||
global: true
|
||||
state: absent
|
||||
|
||||
- name: Install "coffee-script" node.js package from custom registry.
|
||||
|
|
|
@ -44,7 +44,7 @@ options:
|
|||
description:
|
||||
- Install the node.js library globally
|
||||
required: false
|
||||
default: no
|
||||
default: false
|
||||
type: bool
|
||||
executable:
|
||||
type: path
|
||||
|
@ -56,14 +56,14 @@ options:
|
|||
- Use the --ignore-scripts flag when installing.
|
||||
required: false
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
production:
|
||||
description:
|
||||
- Install dependencies in production mode.
|
||||
- Yarn will ignore any dependencies under devDependencies in package.json
|
||||
required: false
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
registry:
|
||||
type: str
|
||||
description:
|
||||
|
@ -96,12 +96,12 @@ EXAMPLES = '''
|
|||
- name: Install "imagemin" node.js package globally.
|
||||
community.general.yarn:
|
||||
name: imagemin
|
||||
global: yes
|
||||
global: true
|
||||
|
||||
- name: Remove the globally-installed package "imagemin".
|
||||
community.general.yarn:
|
||||
name: imagemin
|
||||
global: yes
|
||||
global: true
|
||||
state: absent
|
||||
|
||||
- name: Install "imagemin" node.js package from custom registry.
|
||||
|
|
|
@ -25,7 +25,7 @@ options:
|
|||
- During upgrade, reset versioned world dependencies and change logic to prefer replacing or downgrading packages (instead of holding them)
|
||||
if the currently installed package is no longer available from any repository.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
name:
|
||||
description:
|
||||
- A package name, like C(foo), or multiple packages, like C(foo, bar).
|
||||
|
@ -35,7 +35,7 @@ options:
|
|||
description:
|
||||
- Do not use any local cache path.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version_added: 1.0.0
|
||||
repository:
|
||||
description:
|
||||
|
@ -56,12 +56,12 @@ options:
|
|||
description:
|
||||
- Update repository indexes. Can be run with other steps or on it's own.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
upgrade:
|
||||
description:
|
||||
- Upgrade all installed packages to their latest version.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
world:
|
||||
description:
|
||||
- Use a custom world file when checking for explicitly installed packages.
|
||||
|
@ -77,12 +77,12 @@ EXAMPLES = '''
|
|||
- name: Update repositories and install foo package
|
||||
community.general.apk:
|
||||
name: foo
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Update repositories and install foo and bar packages
|
||||
community.general.apk:
|
||||
name: foo,bar
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Remove foo package
|
||||
community.general.apk:
|
||||
|
@ -108,39 +108,39 @@ EXAMPLES = '''
|
|||
community.general.apk:
|
||||
name: foo
|
||||
state: latest
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Update repositories and update packages foo and bar to latest versions
|
||||
community.general.apk:
|
||||
name: foo,bar
|
||||
state: latest
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Update all installed packages to the latest versions
|
||||
community.general.apk:
|
||||
upgrade: yes
|
||||
upgrade: true
|
||||
|
||||
- name: Upgrade / replace / downgrade / uninstall all installed packages to the latest versions available
|
||||
community.general.apk:
|
||||
available: yes
|
||||
upgrade: yes
|
||||
available: true
|
||||
upgrade: true
|
||||
|
||||
- name: Update repositories as a separate step
|
||||
community.general.apk:
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Install package from a specific repository
|
||||
community.general.apk:
|
||||
name: foo
|
||||
state: latest
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
repository: http://dl-3.alpinelinux.org/alpine/edge/main
|
||||
|
||||
- name: Install package without using cache
|
||||
community.general.apk:
|
||||
name: foo
|
||||
state: latest
|
||||
no_cache: yes
|
||||
no_cache: true
|
||||
|
||||
- name: Install package checking a custom world
|
||||
community.general.apk:
|
||||
|
|
|
@ -36,12 +36,12 @@ options:
|
|||
- Remove other then added repositories
|
||||
- Used if I(state=present)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
update:
|
||||
description:
|
||||
- Update the package database after changing repositories.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
author:
|
||||
- Mikhail Gordeev (@obirvalger)
|
||||
'''
|
||||
|
@ -56,13 +56,13 @@ EXAMPLES = '''
|
|||
community.general.apt_repo:
|
||||
repo: Sisysphus
|
||||
state: present
|
||||
remove_others: yes
|
||||
remove_others: true
|
||||
|
||||
- name: Add local repository `/space/ALT/Sisyphus` and update package cache
|
||||
community.general.apt_repo:
|
||||
repo: copy:///space/ALT/Sisyphus
|
||||
state: present
|
||||
update: yes
|
||||
update: true
|
||||
'''
|
||||
|
||||
RETURN = ''' # '''
|
||||
|
|
|
@ -35,7 +35,7 @@ options:
|
|||
description:
|
||||
- update the package database first C(apt-get update).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
author:
|
||||
- Evgenii Terechkov (@evgkrsk)
|
||||
'''
|
||||
|
@ -68,7 +68,7 @@ EXAMPLES = '''
|
|||
community.general.apt_rpm:
|
||||
name: bar
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
'''
|
||||
|
||||
import json
|
||||
|
|
|
@ -51,12 +51,12 @@ options:
|
|||
description:
|
||||
- update homebrew itself first.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
upgrade_all:
|
||||
description:
|
||||
- upgrade all homebrew packages.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
aliases: ['upgrade']
|
||||
install_options:
|
||||
description:
|
||||
|
@ -91,18 +91,18 @@ EXAMPLES = '''
|
|||
- community.general.homebrew:
|
||||
name: foo
|
||||
state: present
|
||||
update_homebrew: yes
|
||||
update_homebrew: true
|
||||
|
||||
# Update homebrew first and upgrade formula foo to latest available with 'brew' in default path
|
||||
- community.general.homebrew:
|
||||
name: foo
|
||||
state: latest
|
||||
update_homebrew: yes
|
||||
update_homebrew: true
|
||||
|
||||
# Update homebrew and upgrade all packages
|
||||
- community.general.homebrew:
|
||||
update_homebrew: yes
|
||||
upgrade_all: yes
|
||||
update_homebrew: true
|
||||
upgrade_all: true
|
||||
|
||||
# Miscellaneous other examples
|
||||
- community.general.homebrew:
|
||||
|
@ -133,7 +133,7 @@ EXAMPLES = '''
|
|||
|
||||
- name: Use ignore-pinned option while upgrading all
|
||||
community.general.homebrew:
|
||||
upgrade_all: yes
|
||||
upgrade_all: true
|
||||
upgrade_options: ignore-pinned
|
||||
'''
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ options:
|
|||
- Update homebrew itself first.
|
||||
- Note that C(brew cask update) is a synonym for C(brew update).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
install_options:
|
||||
description:
|
||||
- Options flags to install a package.
|
||||
|
@ -62,13 +62,13 @@ options:
|
|||
description:
|
||||
- Allow external apps.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
upgrade_all:
|
||||
description:
|
||||
- Upgrade all casks.
|
||||
- Mutually exclusive with C(upgraded) state.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
aliases: [ 'upgrade' ]
|
||||
greedy:
|
||||
description:
|
||||
|
@ -76,7 +76,7 @@ options:
|
|||
- Passes --greedy to brew cask outdated when checking
|
||||
if an installed cask has a newer version available.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
'''
|
||||
EXAMPLES = '''
|
||||
- name: Install cask
|
||||
|
|
|
@ -21,7 +21,7 @@ options:
|
|||
description:
|
||||
- Whether to accept the license for the package(s).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
name:
|
||||
description:
|
||||
- One or more packages to install or remove.
|
||||
|
@ -49,28 +49,28 @@ EXAMPLES = r'''
|
|||
community.general.installp:
|
||||
name: foo
|
||||
repository_path: /repository/AIX71/installp/base
|
||||
accept_license: yes
|
||||
accept_license: true
|
||||
state: present
|
||||
|
||||
- name: Install bos.sysmgt that includes bos.sysmgt.nim.master, bos.sysmgt.nim.spot
|
||||
community.general.installp:
|
||||
name: bos.sysmgt
|
||||
repository_path: /repository/AIX71/installp/base
|
||||
accept_license: yes
|
||||
accept_license: true
|
||||
state: present
|
||||
|
||||
- name: Install bos.sysmgt.nim.master only
|
||||
community.general.installp:
|
||||
name: bos.sysmgt.nim.master
|
||||
repository_path: /repository/AIX71/installp/base
|
||||
accept_license: yes
|
||||
accept_license: true
|
||||
state: present
|
||||
|
||||
- name: Install bos.sysmgt.nim.master and bos.sysmgt.nim.spot
|
||||
community.general.installp:
|
||||
name: bos.sysmgt.nim.master, bos.sysmgt.nim.spot
|
||||
repository_path: /repository/AIX71/installp/base
|
||||
accept_license: yes
|
||||
accept_license: true
|
||||
state: present
|
||||
|
||||
- name: Remove packages bos.sysmgt.nim.master
|
||||
|
|
|
@ -43,11 +43,11 @@ options:
|
|||
type: str
|
||||
validate_certs:
|
||||
description:
|
||||
- If C(no), SSL certificates will not be validated. This should only be
|
||||
set to C(no) when no other option exists. Prior to 1.9.3 the code
|
||||
defaulted to C(no).
|
||||
- If C(false), SSL certificates will not be validated. This should only be
|
||||
set to C(false) when no other option exists. Prior to 1.9.3 the code
|
||||
defaulted to C(false).
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
|
|
@ -31,7 +31,7 @@ options:
|
|||
- Update Macports and the ports tree, either prior to installing ports or as a separate step.
|
||||
- Equivalent to running C(port selfupdate).
|
||||
aliases: ['update_cache', 'update_ports']
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
state:
|
||||
description:
|
||||
|
@ -43,7 +43,7 @@ options:
|
|||
description:
|
||||
- Upgrade all outdated ports, either prior to installing ports or as a separate step.
|
||||
- Equivalent to running C(port upgrade outdated).
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
variant:
|
||||
description:
|
||||
|
@ -72,13 +72,13 @@ EXAMPLES = '''
|
|||
|
||||
- name: Update Macports and the ports tree, then upgrade all outdated ports
|
||||
community.general.macports:
|
||||
selfupdate: yes
|
||||
upgrade: yes
|
||||
selfupdate: true
|
||||
upgrade: true
|
||||
|
||||
- name: Update Macports and the ports tree, then install the foo port
|
||||
community.general.macports:
|
||||
name: foo
|
||||
selfupdate: yes
|
||||
selfupdate: true
|
||||
|
||||
- name: Remove the foo port
|
||||
community.general.macports:
|
||||
|
|
|
@ -40,7 +40,7 @@ options:
|
|||
description:
|
||||
- Upgrade all installed Mac App Store apps.
|
||||
type: bool
|
||||
default: "no"
|
||||
default: false
|
||||
aliases: ["upgrade"]
|
||||
requirements:
|
||||
- macOS 10.11+
|
||||
|
@ -77,7 +77,7 @@ EXAMPLES = '''
|
|||
|
||||
- name: Upgrade all installed Mac App Store apps
|
||||
community.general.mas:
|
||||
upgrade_all: yes
|
||||
upgrade_all: true
|
||||
|
||||
- name: Install specific apps and also upgrade all others
|
||||
community.general.mas:
|
||||
|
@ -85,13 +85,13 @@ EXAMPLES = '''
|
|||
- 409183694 # Keynote
|
||||
- 413857545 # Divvy
|
||||
state: present
|
||||
upgrade_all: yes
|
||||
upgrade_all: true
|
||||
|
||||
- name: Uninstall Divvy
|
||||
community.general.mas:
|
||||
id: 413857545
|
||||
state: absent
|
||||
become: yes # Uninstallation requires root permissions
|
||||
become: true # Uninstallation requires root permissions
|
||||
'''
|
||||
|
||||
RETURN = r''' # '''
|
||||
|
@ -274,7 +274,7 @@ def main():
|
|||
if mas.is_installed(app):
|
||||
# Ensure we are root
|
||||
if os.getuid() != 0:
|
||||
module.fail_json(msg="Uninstalling apps requires root permissions ('become: yes')")
|
||||
module.fail_json(msg="Uninstalling apps requires root permissions ('become: true')")
|
||||
|
||||
mas.app_command('uninstall', app)
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ options:
|
|||
name:
|
||||
description:
|
||||
- A name or a list of names of the packages.
|
||||
required: yes
|
||||
required: true
|
||||
type: list
|
||||
elements: str
|
||||
state:
|
||||
|
@ -43,13 +43,13 @@ options:
|
|||
not already installed.
|
||||
- Mutually exclusive with I(snapshot).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
snapshot:
|
||||
description:
|
||||
- Force C(%c) and C(%m) to expand to C(snapshots), even on a release kernel.
|
||||
- Mutually exclusive with I(build).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version_added: 1.3.0
|
||||
ports_dir:
|
||||
description:
|
||||
|
@ -63,13 +63,13 @@ options:
|
|||
file(s) in the old packages which are annotated with @extra in
|
||||
the packaging-list.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
quick:
|
||||
description:
|
||||
- Replace or delete packages quickly; do not bother with checksums
|
||||
before removing normal files.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
notes:
|
||||
- When used with a C(loop:) each package will be processed individually,
|
||||
it is much more efficient to pass the list directly to the I(name) option.
|
||||
|
@ -95,7 +95,7 @@ EXAMPLES = '''
|
|||
community.general.openbsd_pkg:
|
||||
name: nmap
|
||||
state: present
|
||||
build: yes
|
||||
build: true
|
||||
|
||||
- name: Specify a pkg flavour with '--'
|
||||
community.general.openbsd_pkg:
|
||||
|
@ -120,13 +120,13 @@ EXAMPLES = '''
|
|||
- name: Purge a package and it's configuration files
|
||||
community.general.openbsd_pkg:
|
||||
name: mpd
|
||||
clean: yes
|
||||
clean: true
|
||||
state: absent
|
||||
|
||||
- name: Quickly remove a package without checking checksums
|
||||
community.general.openbsd_pkg:
|
||||
name: qt5
|
||||
quick: yes
|
||||
quick: true
|
||||
state: absent
|
||||
'''
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ EXAMPLES = '''
|
|||
community.general.opkg:
|
||||
name: foo
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Remove foo
|
||||
community.general.opkg:
|
||||
|
|
|
@ -48,7 +48,7 @@ options:
|
|||
Same as C(extra_args="--nodeps --nodeps").
|
||||
When combined with I(update_cache), force a refresh of all package databases.
|
||||
Same as C(update_cache_extra_args="--refresh --refresh").
|
||||
default: no
|
||||
default: false
|
||||
type: bool
|
||||
|
||||
remove_nosave:
|
||||
|
@ -56,7 +56,7 @@ options:
|
|||
- When removing packages, do not save modified configuration files as C(.pacsave) files.
|
||||
(passes C(--nosave) to pacman)
|
||||
version_added: 4.6.0
|
||||
default: no
|
||||
default: false
|
||||
type: bool
|
||||
|
||||
executable:
|
||||
|
@ -198,7 +198,7 @@ EXAMPLES = """
|
|||
community.general.pacman:
|
||||
name: foo
|
||||
state: latest
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Remove packages foo and bar
|
||||
community.general.pacman:
|
||||
|
@ -215,11 +215,11 @@ EXAMPLES = """
|
|||
|
||||
- name: Run the equivalent of "pacman -Sy" as a separate step
|
||||
community.general.pacman:
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Run the equivalent of "pacman -Su" as a separate step
|
||||
community.general.pacman:
|
||||
upgrade: yes
|
||||
upgrade: true
|
||||
|
||||
- name: Run the equivalent of "pacman -Syu" as a separate step
|
||||
# Since community.general 5.0.0 the 'changed' state of this call
|
||||
|
@ -232,14 +232,14 @@ EXAMPLES = """
|
|||
# register: result
|
||||
# changed_when: result.packages | length > 0
|
||||
community.general.pacman:
|
||||
update_cache: yes
|
||||
upgrade: yes
|
||||
update_cache: true
|
||||
upgrade: true
|
||||
|
||||
- name: Run the equivalent of "pacman -Rdd", force remove package baz
|
||||
community.general.pacman:
|
||||
name: baz
|
||||
state: absent
|
||||
force: yes
|
||||
force: true
|
||||
|
||||
- name: Install foo as dependency and leave reason untouched if already installed
|
||||
community.general.pacman:
|
||||
|
|
|
@ -36,7 +36,7 @@ options:
|
|||
description:
|
||||
- Accept any licences.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
aliases: [ accept, accept_licences ]
|
||||
be_name:
|
||||
description:
|
||||
|
@ -46,7 +46,7 @@ options:
|
|||
description:
|
||||
- Refresh publishers before execution.
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
'''
|
||||
EXAMPLES = '''
|
||||
- name: Install Vim
|
||||
|
@ -56,7 +56,7 @@ EXAMPLES = '''
|
|||
- name: Install Vim without refreshing publishers
|
||||
community.general.pkg5:
|
||||
name: editor/vim
|
||||
refresh: no
|
||||
refresh: false
|
||||
|
||||
- name: Remove finger daemon
|
||||
community.general.pkg5:
|
||||
|
|
|
@ -49,27 +49,27 @@ options:
|
|||
description:
|
||||
- Update repository database. Can be run with other steps or on it's own.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
upgrade:
|
||||
description:
|
||||
- Upgrade main packages to their newer versions
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
full_upgrade:
|
||||
description:
|
||||
- Upgrade all packages to their newer versions
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
clean:
|
||||
description:
|
||||
- Clean packages cache
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
force:
|
||||
description:
|
||||
- Force package reinstall
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
@ -86,7 +86,7 @@ EXAMPLES = '''
|
|||
- name: Update cache and install foo package
|
||||
community.general.pkgin:
|
||||
name: foo
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Remove package foo
|
||||
community.general.pkgin:
|
||||
|
@ -100,24 +100,24 @@ EXAMPLES = '''
|
|||
|
||||
- name: Update repositories as a separate step
|
||||
community.general.pkgin:
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Upgrade main packages (equivalent to pkgin upgrade)
|
||||
community.general.pkgin:
|
||||
upgrade: yes
|
||||
upgrade: true
|
||||
|
||||
- name: Upgrade all packages (equivalent to pkgin full-upgrade)
|
||||
community.general.pkgin:
|
||||
full_upgrade: yes
|
||||
full_upgrade: true
|
||||
|
||||
- name: Force-upgrade all packages (equivalent to pkgin -F full-upgrade)
|
||||
community.general.pkgin:
|
||||
full_upgrade: yes
|
||||
force: yes
|
||||
full_upgrade: true
|
||||
force: true
|
||||
|
||||
- name: Clean packages cache (equivalent to pkgin clean)
|
||||
community.general.pkgin:
|
||||
clean: yes
|
||||
clean: true
|
||||
'''
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ options:
|
|||
- Use local package base instead of fetching an updated one.
|
||||
type: bool
|
||||
required: false
|
||||
default: no
|
||||
default: false
|
||||
annotation:
|
||||
description:
|
||||
- A list of keyvalue-pairs of the form
|
||||
|
@ -91,14 +91,14 @@ options:
|
|||
- Remove automatically installed packages which are no longer needed.
|
||||
required: false
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
ignore_osver:
|
||||
description:
|
||||
- Ignore FreeBSD OS version check, useful on -STABLE and -CURRENT branches.
|
||||
- Defines the C(IGNORE_OSVERSION) environment variable.
|
||||
required: false
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version_added: 1.3.0
|
||||
author: "bleader (@bleader)"
|
||||
notes:
|
||||
|
|
|
@ -47,12 +47,12 @@ options:
|
|||
choices: [ absent, installed, latest, present, removed ]
|
||||
update_catalog:
|
||||
description:
|
||||
- If you always want to refresh your catalog from the mirror, even when it's not stale, set this to C(yes).
|
||||
- If you always want to refresh your catalog from the mirror, even when it's not stale, set this to C(true).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
force:
|
||||
description:
|
||||
- To allow the update process to downgrade packages to match what is present in the repository, set this to C(yes).
|
||||
- To allow the update process to downgrade packages to match what is present in the repository, set this to C(true).
|
||||
- This is useful for rolling back to stable from testing, or similar operations.
|
||||
type: bool
|
||||
default: false
|
||||
|
@ -94,7 +94,7 @@ EXAMPLES = r'''
|
|||
community.general.pkgutil:
|
||||
name: '*'
|
||||
state: latest
|
||||
force: yes
|
||||
force: true
|
||||
'''
|
||||
|
||||
RETURN = r''' # '''
|
||||
|
|
|
@ -40,19 +40,19 @@ options:
|
|||
description:
|
||||
- Update packages to the best version available (--update)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
deep:
|
||||
description:
|
||||
- Consider the entire dependency tree of packages (--deep)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
newuse:
|
||||
description:
|
||||
- Include installed packages where USE flags have changed (--newuse)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
changed_use:
|
||||
description:
|
||||
|
@ -60,31 +60,31 @@ options:
|
|||
- flags that the user has not enabled are added or removed
|
||||
- (--changed-use)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
oneshot:
|
||||
description:
|
||||
- Do not add the packages to the world file (--oneshot)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
noreplace:
|
||||
description:
|
||||
- Do not re-emerge installed packages (--noreplace)
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
|
||||
nodeps:
|
||||
description:
|
||||
- Only merge packages but not their dependencies (--nodeps)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
onlydeps:
|
||||
description:
|
||||
- Only merge packages' dependencies but not the packages (--onlydeps)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
depclean:
|
||||
description:
|
||||
|
@ -92,25 +92,25 @@ options:
|
|||
- If no package is specified, clean up the world's dependencies
|
||||
- Otherwise, --depclean serves as a dependency aware version of --unmerge
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
quiet:
|
||||
description:
|
||||
- Run emerge in quiet mode (--quiet)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
verbose:
|
||||
description:
|
||||
- Run emerge in verbose mode (--verbose)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
sync:
|
||||
description:
|
||||
- Sync package repositories first
|
||||
- If yes, perform "emerge --sync"
|
||||
- If web, perform "emerge-webrsync"
|
||||
- If C(yes), perform "emerge --sync"
|
||||
- If C(web), perform "emerge-webrsync"
|
||||
choices: [ "web", "yes", "no" ]
|
||||
type: str
|
||||
|
||||
|
@ -118,32 +118,32 @@ options:
|
|||
description:
|
||||
- Merge only packages specified at C(PORTAGE_BINHOST) in C(make.conf).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version_added: 1.3.0
|
||||
|
||||
getbinpkg:
|
||||
description:
|
||||
- Prefer packages specified at C(PORTAGE_BINHOST) in C(make.conf).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
usepkgonly:
|
||||
description:
|
||||
- Merge only binaries (no compiling).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
usepkg:
|
||||
description:
|
||||
- Tries to use the binary package(s) in the locally available packages directory.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
keepgoing:
|
||||
description:
|
||||
- Continue as much as possible after an error.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
description:
|
||||
|
@ -165,7 +165,7 @@ options:
|
|||
- Redirect all build output to logs alone, and do not display it
|
||||
- on stdout (--quiet-build)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
quietfail:
|
||||
description:
|
||||
|
@ -173,7 +173,7 @@ options:
|
|||
- Only the die message and the path of the build log will be
|
||||
- displayed on stdout.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
requirements: [ gentoolkit ]
|
||||
author:
|
||||
|
@ -196,34 +196,34 @@ EXAMPLES = '''
|
|||
- name: Update package foo to the latest version (os specific alternative to latest)
|
||||
community.general.portage:
|
||||
package: foo
|
||||
update: yes
|
||||
update: true
|
||||
|
||||
- name: Install package foo using PORTAGE_BINHOST setup
|
||||
community.general.portage:
|
||||
package: foo
|
||||
getbinpkg: yes
|
||||
getbinpkg: true
|
||||
|
||||
- name: Re-install world from binary packages only and do not allow any compiling
|
||||
community.general.portage:
|
||||
package: '@world'
|
||||
usepkgonly: yes
|
||||
usepkgonly: true
|
||||
|
||||
- name: Sync repositories and update world
|
||||
community.general.portage:
|
||||
package: '@world'
|
||||
update: yes
|
||||
deep: yes
|
||||
sync: yes
|
||||
update: true
|
||||
deep: true
|
||||
sync: true
|
||||
|
||||
- name: Remove unneeded packages
|
||||
community.general.portage:
|
||||
depclean: yes
|
||||
depclean: true
|
||||
|
||||
- name: Remove package foo if it is not explicitly needed
|
||||
community.general.portage:
|
||||
package: foo
|
||||
state: absent
|
||||
depclean: yes
|
||||
depclean: true
|
||||
'''
|
||||
|
||||
import os
|
||||
|
|
|
@ -37,7 +37,7 @@ options:
|
|||
- use packages instead of ports whenever available
|
||||
type: bool
|
||||
required: false
|
||||
default: yes
|
||||
default: true
|
||||
author: "berenddeboer (@berenddeboer)"
|
||||
'''
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ options:
|
|||
description:
|
||||
- Whether or not to add the export distributor to new C(rpm) repositories.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
feed:
|
||||
description:
|
||||
- Upstream feed URL to receive updates from.
|
||||
|
@ -36,14 +36,14 @@ options:
|
|||
properly send a 401, logins will fail. This option forces the sending of
|
||||
the Basic authentication header upon initial request.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
generate_sqlite:
|
||||
description:
|
||||
- Boolean flag to indicate whether sqlite files should be generated during
|
||||
a repository publish.
|
||||
required: false
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
feed_ca_cert:
|
||||
description:
|
||||
- CA certificate string used to validate the feed source SSL certificate.
|
||||
|
@ -120,20 +120,20 @@ options:
|
|||
repoview:
|
||||
description:
|
||||
- Whether to generate repoview files for a published repository. Setting
|
||||
this to "yes" automatically activates C(generate_sqlite).
|
||||
this to C(true) automatically activates C(generate_sqlite).
|
||||
required: false
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
serve_http:
|
||||
description:
|
||||
- Make the repo available over HTTP.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
serve_https:
|
||||
description:
|
||||
- Make the repo available over HTTPS.
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
state:
|
||||
description:
|
||||
- The repo state. A state of C(sync) will queue a sync of the repo.
|
||||
|
@ -152,15 +152,15 @@ options:
|
|||
- The username for use in HTTP basic authentication to the pulp API.
|
||||
validate_certs:
|
||||
description:
|
||||
- If C(no), SSL certificates will not be validated. This should only be
|
||||
- If C(false), SSL certificates will not be validated. This should only be
|
||||
used on personally controlled sites using self-signed certificates.
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
wait_for_completion:
|
||||
description:
|
||||
- Wait for asynchronous tasks to complete before returning.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
notes:
|
||||
- This module can currently only create distributors and importers on rpm
|
||||
repositories. Contributions to support other repo types are welcome.
|
||||
|
@ -183,7 +183,7 @@ EXAMPLES = '''
|
|||
relative_url: centos/6/updates
|
||||
url_username: admin
|
||||
url_password: admin
|
||||
force_basic_auth: yes
|
||||
force_basic_auth: true
|
||||
state: present
|
||||
|
||||
- name: Remove a repo from the pulp server
|
||||
|
|
|
@ -138,7 +138,7 @@ options:
|
|||
description:
|
||||
- Register the system even if it is already registered
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
release:
|
||||
description:
|
||||
- Set a release version
|
||||
|
@ -173,7 +173,7 @@ options:
|
|||
RHSM server immediately. When this option is false, then syspurpose attributes
|
||||
will be synchronized with RHSM server by rhsmcertd daemon.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
|
|
@ -54,7 +54,7 @@ options:
|
|||
description:
|
||||
- Force registration, even if system is already registered.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version_added: 2.0.0
|
||||
ca_cert:
|
||||
description:
|
||||
|
@ -73,14 +73,14 @@ options:
|
|||
default: []
|
||||
enable_eus:
|
||||
description:
|
||||
- If C(no), extended update support will be requested.
|
||||
- If C(false), extended update support will be requested.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
nopackages:
|
||||
description:
|
||||
- If C(yes), the registered node will not upload its installed packages information to Satellite server.
|
||||
- If C(true), the registered node will not upload its installed packages information to Satellite server.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
|
@ -100,7 +100,7 @@ EXAMPLES = r'''
|
|||
community.general.rhn_register:
|
||||
state: present
|
||||
activationkey: 1-222333444
|
||||
enable_eus: yes
|
||||
enable_eus: true
|
||||
|
||||
- name: Register with activationkey and set a profilename which may differ from the hostname
|
||||
community.general.rhn_register:
|
||||
|
@ -128,7 +128,7 @@ EXAMPLES = r'''
|
|||
username: joe_user
|
||||
password: somepass
|
||||
server_url: https://xmlrpc.my.satellite/XMLRPC
|
||||
force: yes
|
||||
force: true
|
||||
'''
|
||||
|
||||
RETURN = r'''
|
||||
|
|
|
@ -35,7 +35,7 @@ options:
|
|||
- The ID of repositories to enable.
|
||||
- To operate on several repositories this can accept a comma separated
|
||||
list or a YAML list.
|
||||
required: True
|
||||
required: true
|
||||
type: list
|
||||
elements: str
|
||||
purge:
|
||||
|
@ -44,7 +44,7 @@ options:
|
|||
Only set this to C(True) if passing in a list of repositories to the C(name) field.
|
||||
Using this with C(loop) will most likely not have the desired result.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
|
|
@ -40,7 +40,7 @@ options:
|
|||
This option can only be specified if there is a single snap in the task.
|
||||
type: bool
|
||||
required: false
|
||||
default: no
|
||||
default: false
|
||||
channel:
|
||||
description:
|
||||
- Define which release of a snap is installed and tracked for updates.
|
||||
|
@ -104,7 +104,7 @@ EXAMPLES = '''
|
|||
- name: Install "foo" with option --classic
|
||||
community.general.snap:
|
||||
name: foo
|
||||
classic: yes
|
||||
classic: true
|
||||
|
||||
# Install a snap with from a specific channel
|
||||
- name: Install "foo" with option --channel=latest/edge
|
||||
|
|
|
@ -39,7 +39,7 @@ options:
|
|||
description:
|
||||
- Whether to cast, dispel or rebuild a package
|
||||
- state C(cast) is an equivalent of C(present), not C(latest)
|
||||
- state C(latest) always triggers C(update_cache=yes)
|
||||
- state C(latest) always triggers C(update_cache=true)
|
||||
- state C(rebuild) implies cast of all specified spells, not only
|
||||
those existed before
|
||||
choices: ["present", "latest", "absent", "cast", "dispelled", "rebuild"]
|
||||
|
@ -61,13 +61,13 @@ options:
|
|||
description:
|
||||
- Whether or not to update sorcery scripts at the very first stage
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
|
||||
update_cache:
|
||||
description:
|
||||
- Whether or not to update grimoire collection before casting spells
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
aliases: ["update_codex"]
|
||||
|
||||
cache_valid_time:
|
||||
|
@ -132,17 +132,17 @@ EXAMPLES = '''
|
|||
community.general.sorcery:
|
||||
spell: '*'
|
||||
state: rebuild
|
||||
update: yes
|
||||
update_cache: yes
|
||||
update: true
|
||||
update_cache: true
|
||||
|
||||
- name: Refresh the grimoire collection if it is 1 day old using native sorcerous alias
|
||||
community.general.sorcery:
|
||||
update_codex: yes
|
||||
update_codex: true
|
||||
cache_valid_time: 86400
|
||||
|
||||
- name: Update only Sorcery itself
|
||||
community.general.sorcery:
|
||||
update: yes
|
||||
update: true
|
||||
'''
|
||||
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ options:
|
|||
EXAMPLES = '''
|
||||
- name: Update the OS to the latest version
|
||||
community.general.swupd:
|
||||
update: yes
|
||||
update: true
|
||||
|
||||
- name: Installs the "foo" bundle
|
||||
community.general.swupd:
|
||||
|
@ -85,11 +85,11 @@ EXAMPLES = '''
|
|||
|
||||
- name: Check integrity of filesystem
|
||||
community.general.swupd:
|
||||
verify: yes
|
||||
verify: true
|
||||
|
||||
- name: Downgrade OS to release 12920
|
||||
community.general.swupd:
|
||||
verify: yes
|
||||
verify: true
|
||||
manifest: 12920
|
||||
'''
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ options:
|
|||
name:
|
||||
description:
|
||||
- A list of package names to install, upgrade or remove.
|
||||
required: yes
|
||||
required: true
|
||||
aliases: [ package, pkg ]
|
||||
type: list
|
||||
elements: str
|
||||
|
@ -35,18 +35,18 @@ options:
|
|||
description:
|
||||
- Update the package database first C(urpmi.update -a).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
no_recommends:
|
||||
description:
|
||||
- Corresponds to the C(--no-recommends) option for I(urpmi).
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
force:
|
||||
description:
|
||||
- Assume "yes" is the answer to any question urpmi has to ask.
|
||||
Corresponds to the C(--force) option for I(urpmi).
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
root:
|
||||
description:
|
||||
- Specifies an alternative install root, relative to which all packages will be installed.
|
||||
|
@ -77,7 +77,7 @@ EXAMPLES = '''
|
|||
- community.general.urpmi:
|
||||
name: bar
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
'''
|
||||
|
||||
|
||||
|
|
|
@ -38,54 +38,68 @@ options:
|
|||
that they are not required by other packages and were not
|
||||
explicitly installed by a user.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
update_cache:
|
||||
description:
|
||||
- Whether or not to refresh the master package lists. This can be
|
||||
run as part of a package installation or as a separate step.
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
upgrade:
|
||||
description:
|
||||
- Whether or not to upgrade whole system
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
upgrade_xbps:
|
||||
description:
|
||||
- Whether or not to upgrade the xbps package when necessary.
|
||||
Before installing new packages,
|
||||
xbps requires the user to update the xbps package itself.
|
||||
Thus when this option is set to C(no),
|
||||
Thus when this option is set to C(false),
|
||||
upgrades and installations will fail when xbps is not up to date.
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
version_added: '0.2.0'
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Install package foo (automatically updating the xbps package if needed)
|
||||
community.general.xbps: name=foo state=present
|
||||
community.general.xbps:
|
||||
name: foo
|
||||
state: present
|
||||
|
||||
- name: Upgrade package foo
|
||||
community.general.xbps: name=foo state=latest update_cache=yes
|
||||
community.general.xbps:
|
||||
name: foo
|
||||
state: latest
|
||||
update_cache: true
|
||||
|
||||
- name: Remove packages foo and bar
|
||||
community.general.xbps: name=foo,bar state=absent
|
||||
community.general.xbps:
|
||||
name:
|
||||
- foo
|
||||
- bar
|
||||
state: absent
|
||||
|
||||
- name: Recursively remove package foo
|
||||
community.general.xbps: name=foo state=absent recurse=yes
|
||||
community.general.xbps:
|
||||
name: foo
|
||||
state: absent
|
||||
recurse: true
|
||||
|
||||
- name: Update package cache
|
||||
community.general.xbps: update_cache=yes
|
||||
community.general.xbps:
|
||||
update_cache: true
|
||||
|
||||
- name: Upgrade packages
|
||||
community.general.xbps: upgrade=yes
|
||||
community.general.xbps:
|
||||
upgrade: true
|
||||
|
||||
- name: Install a package, failing if the xbps package is out of date
|
||||
community.general.xbps:
|
||||
name: foo
|
||||
state: present
|
||||
upgrade_xbps: no
|
||||
upgrade_xbps: false
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -73,33 +73,33 @@ options:
|
|||
signature being installed. Has an effect only if state is
|
||||
I(present) or I(latest).
|
||||
required: false
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
disable_recommends:
|
||||
description:
|
||||
- Corresponds to the C(--no-recommends) option for I(zypper). Default behavior (C(yes)) modifies zypper's default behavior; C(no) does
|
||||
- Corresponds to the C(--no-recommends) option for I(zypper). Default behavior (C(true)) modifies zypper's default behavior; C(false) does
|
||||
install recommended packages.
|
||||
required: false
|
||||
default: "yes"
|
||||
default: true
|
||||
type: bool
|
||||
force:
|
||||
description:
|
||||
- Adds C(--force) option to I(zypper). Allows to downgrade packages and change vendor or architecture.
|
||||
required: false
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
force_resolution:
|
||||
description:
|
||||
- Adds C(--force-resolution) option to I(zypper). Allows to (un)install packages with conflicting requirements (resolver will choose a solution).
|
||||
required: false
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
version_added: '0.2.0'
|
||||
update_cache:
|
||||
description:
|
||||
- Run the equivalent of C(zypper refresh) before the operation. Disabled in check mode.
|
||||
required: false
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
aliases: [ "refresh" ]
|
||||
oldpackage:
|
||||
|
@ -107,7 +107,7 @@ options:
|
|||
- Adds C(--oldpackage) option to I(zypper). Allows to downgrade packages with less side-effects than force. This is implied as soon as a
|
||||
version is specified as part of the package name.
|
||||
required: false
|
||||
default: "no"
|
||||
default: false
|
||||
type: bool
|
||||
extra_args:
|
||||
required: false
|
||||
|
@ -156,7 +156,7 @@ EXAMPLES = '''
|
|||
community.general.zypper:
|
||||
name: apache2
|
||||
state: present
|
||||
disable_recommends: no
|
||||
disable_recommends: false
|
||||
|
||||
- name: Apply a given patch
|
||||
community.general.zypper:
|
||||
|
@ -207,7 +207,7 @@ EXAMPLES = '''
|
|||
community.general.zypper:
|
||||
name: openssl
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: "Install specific version (possible comparisons: <, >, <=, >=, =)"
|
||||
community.general.zypper:
|
||||
|
|
|
@ -44,12 +44,12 @@ options:
|
|||
I(present).
|
||||
- Needs zypper version >= 1.6.2.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
autorefresh:
|
||||
description:
|
||||
- Enable autorefresh of the repository.
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
aliases: [ "refresh" ]
|
||||
priority:
|
||||
description:
|
||||
|
@ -62,7 +62,7 @@ options:
|
|||
- Overwrite multiple repository entries, if repositories with both name and
|
||||
URL already exist.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
auto_import_keys:
|
||||
description:
|
||||
- Automatically import the gpg signing key of the new or changed repository.
|
||||
|
@ -70,18 +70,18 @@ options:
|
|||
- Implies runrefresh.
|
||||
- Only works with C(.repo) files if `name` is given explicitly.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
runrefresh:
|
||||
description:
|
||||
- Refresh the package list of the given repository.
|
||||
- Can be used with repo=* to refresh all repositories.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
enabled:
|
||||
description:
|
||||
- Set repository to enabled (or disabled).
|
||||
type: bool
|
||||
default: yes
|
||||
default: true
|
||||
|
||||
|
||||
requirements:
|
||||
|
@ -109,19 +109,19 @@ EXAMPLES = '''
|
|||
- name: Refresh all repos
|
||||
community.general.zypper_repository:
|
||||
repo: '*'
|
||||
runrefresh: yes
|
||||
runrefresh: true
|
||||
|
||||
- name: Add a repo and add its gpg key
|
||||
community.general.zypper_repository:
|
||||
repo: 'http://download.opensuse.org/repositories/systemsmanagement/openSUSE_Leap_42.1/'
|
||||
auto_import_keys: yes
|
||||
auto_import_keys: true
|
||||
|
||||
- name: Force refresh of a repository
|
||||
community.general.zypper_repository:
|
||||
repo: 'http://my_internal_ci_repo/repo'
|
||||
name: my_ci_repo
|
||||
state: present
|
||||
runrefresh: yes
|
||||
runrefresh: true
|
||||
'''
|
||||
|
||||
import traceback
|
||||
|
|
Loading…
Reference in a new issue