Class: Ansible::Ruby::Modules::Apt

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

Overview

Manages I(apt) packages (such as for Debian/Ubuntu).

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

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

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

Constructor Details

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

Instance Method Details

#allow_unauthenticated:yes, ...

Returns Ignore if packages cannot be authenticated. This is useful for bootstrapping environments that manage their own apt-key setup.,C(allow_unauthenticated) is only supported with state: I(install)/I(present).

Returns:

  • (:yes, :no, nil)

    Ignore if packages cannot be authenticated. This is useful for bootstrapping environments that manage their own apt-key setup.,C(allow_unauthenticated) is only supported with state: I(install)/I(present)



44
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 44

attribute :allow_unauthenticated

#autoclean:yes, ...

Returns If C(yes), cleans the local repository of retrieved package files that can no longer be downloaded.

Returns:

  • (:yes, :no, nil)

    If C(yes), cleans the local repository of retrieved package files that can no longer be downloaded.



64
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 64

attribute :autoclean

#autoremove:yes, ...

Returns If C(yes), remove unused dependency packages for all module states except I(build-dep). It can also be used as the only option.,Previous to version 2.4, autoclean was also an alias for autoremove, now it is its own separate command. See documentation for further information.

Returns:

  • (:yes, :no, nil)

    If C(yes), remove unused dependency packages for all module states except I(build-dep). It can also be used as the only option.,Previous to version 2.4, autoclean was also an alias for autoremove, now it is its own separate command. See documentation for further information.



60
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 60

attribute :autoremove

#cache_valid_timeInteger?

Returns Update the apt cache if its older than the I(cache_valid_time). This option is set in seconds. As of Ansible 2.4, this sets I(update_cache=yes).

Returns:

  • (Integer, nil)

    Update the apt cache if its older than the I(cache_valid_time). This option is set in seconds. As of Ansible 2.4, this sets I(update_cache=yes).



24
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 24

attribute :cache_valid_time

#debString?

Returns Path to a .deb package on the remote machine.,If :// in the path, ansible will attempt to download deb before installing. (Version added 2.1).

Returns:

  • (String, nil)

    Path to a .deb package on the remote machine.,If :// in the path, ansible will attempt to download deb before installing. (Version added 2.1)



56
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 56

attribute :deb

#default_releaseString?

Returns Corresponds to the C(-t) option for I(apt) and sets pin priorities.

Returns:

  • (String, nil)

    Corresponds to the C(-t) option for I(apt) and sets pin priorities



32
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 32

attribute :default_release

#dpkg_optionsArray<String>, ...

Returns Add dpkg options to apt command. Defaults to ‘-o “Dpkg::Options::=–force-confdef” -o “Dpkg::Options::=–force-confold”’,Options should be supplied as comma separated list.

Returns:

  • (Array<String>, String, nil)

    Add dpkg options to apt command. Defaults to ‘-o “Dpkg::Options::=–force-confdef” -o “Dpkg::Options::=–force-confold”’,Options should be supplied as comma separated list



52
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 52

attribute :dpkg_options

#force:yes, ...

Returns Corresponds to the C(–force-yes) to I(apt-get) and implies C(allow_unauthenticated: yes),This option will disable checking both the packages’ signatures and the certificates of the web servers they are downloaded from.,This option *is not* the equivalent of passing the C(-f) flag to I(apt-get) on the command line,**This is a destructive operation with the potential to destroy your system, and it should almost never be used.** Please also see C(man apt-get) for more information.

Returns:

  • (:yes, :no, nil)

    Corresponds to the C(–force-yes) to I(apt-get) and implies C(allow_unauthenticated: yes),This option will disable checking both the packages’ signatures and the certificates of the web servers they are downloaded from.,This option *is not* the equivalent of passing the C(-f) flag to I(apt-get) on the command line,**This is a destructive operation with the potential to destroy your system, and it should almost never be used.** Please also see C(man apt-get) for more information.



40
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 40

attribute :force

#force_apt_get:yes, ...

Returns Force usage of apt-get instead of aptitude.

Returns:

  • (:yes, :no, nil)

    Force usage of apt-get instead of aptitude



72
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 72

attribute :force_apt_get

#install_recommendsSymbol?

Returns Corresponds to the C(–no-install-recommends) option for I(apt). C(yes) installs recommended packages. C(no) does not install recommended packages. By default, Ansible will use the same defaults as the operating system. Suggested packages are never installed.

Returns:

  • (Symbol, nil)

    Corresponds to the C(–no-install-recommends) option for I(apt). C(yes) installs recommended packages. C(no) does not install recommended packages. By default, Ansible will use the same defaults as the operating system. Suggested packages are never installed.



36
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 36

attribute :install_recommends

#nameString?

Returns A list of package names, like C(foo), or package specifier with version, like C(foo=1.0). Name wildcards (fnmatch) like C(apt*) and version wildcards like C(foo=1.0*) are also supported.

Returns:

  • (String, nil)

    A list of package names, like C(foo), or package specifier with version, like C(foo=1.0). Name wildcards (fnmatch) like C(apt*) and version wildcards like C(foo=1.0*) are also supported.



12
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 12

attribute :name

#only_upgrade:yes, ...

Returns Only upgrade a package if it is already installed.

Returns:

  • (:yes, :no, nil)

    Only upgrade a package if it is already installed.



68
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 68

attribute :only_upgrade

#purge:yes, ...

Returns Will force purging of configuration files if the module state is set to I(absent).

Returns:

  • (:yes, :no, nil)

    Will force purging of configuration files if the module state is set to I(absent).



28
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 28

attribute :purge

#state:absent, ...

Returns Indicates the desired package state. C(latest) ensures that the latest version is installed. C(build-dep) ensures the package build dependencies are installed.

Returns:

  • (:absent, :"build-dep", :latest, :present, nil)

    Indicates the desired package state. C(latest) ensures that the latest version is installed. C(build-dep) ensures the package build dependencies are installed.



16
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 16

attribute :state

#update_cache:yes, ...

Returns Run the equivalent of C(apt-get update) before the operation. Can be run as part of the package installation or as a separate step.

Returns:

  • (:yes, :no, nil)

    Run the equivalent of C(apt-get update) before the operation. Can be run as part of the package installation or as a separate step.



20
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 20

attribute :update_cache

#upgrade:dist, ...

Returns If yes or safe, performs an aptitude safe-upgrade.,If full, performs an aptitude full-upgrade.,If dist, performs an apt-get dist-upgrade.,Note: This does not upgrade a specific package, use state=latest for that.,Note: Since 2.4, apt-get is used as a fall-back if aptitude is not present.

Returns:

  • (:dist, :full, :no, :safe, :yes, nil)

    If yes or safe, performs an aptitude safe-upgrade.,If full, performs an aptitude full-upgrade.,If dist, performs an apt-get dist-upgrade.,Note: This does not upgrade a specific package, use state=latest for that.,Note: Since 2.4, apt-get is used as a fall-back if aptitude is not present.



48
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 48

attribute :upgrade