Class: Ansible::Ruby::Modules::Package

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/packaging/os/package.rb

Overview

Installs, upgrade and removes packages using the underlying OS package manager. For Windows targets, use the M(win_package) module instead.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#nameString

Returns Package name, or package specifier with version, like C(name-1.0).,Be aware that packages are not always named the same and this module will not ‘translate’ them per distro.

Returns:

  • (String)

    Package name, or package specifier with version, like C(name-1.0).,Be aware that packages are not always named the same and this module will not ‘translate’ them per distro.



13
# File 'lib/ansible/ruby/modules/generated/packaging/os/package.rb', line 13

attribute :name

#stateString

Returns Whether to install (C(present)), or remove (C(absent)) a package. Other states depend on the underlying package module, i.e C(latest).

Returns:

  • (String)

    Whether to install (C(present)), or remove (C(absent)) a package. Other states depend on the underlying package module, i.e C(latest).



17
# File 'lib/ansible/ruby/modules/generated/packaging/os/package.rb', line 17

attribute :state

#useString?

Returns The required package manager module to use (yum, apt, etc). The default ‘auto’ will use existing facts or try to autodetect it.,You should only use this field if the automatic selection is not working for some reason.

Returns:

  • (String, nil)

    The required package manager module to use (yum, apt, etc). The default ‘auto’ will use existing facts or try to autodetect it.,You should only use this field if the automatic selection is not working for some reason.



21
# File 'lib/ansible/ruby/modules/generated/packaging/os/package.rb', line 21

attribute :use