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

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/core/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, #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.

Returns:

  • (:yes, :no, nil)

    Ignore if packages cannot be authenticated. This is useful for bootstrapping environments that manage their own apt-key setup.



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

attribute :allow_unauthenticated

#autoremoveBoolean?

Returns If C(yes), remove unused dependency packages for all module states except I(build-dep).

Returns:

  • (Boolean, nil)

    If C(yes), remove unused dependency packages for all module states except I(build-dep).



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

attribute :autoremove

#cache_valid_timeBoolean?

Returns If C(update_cache) is specified and the last run is less or equal than I(cache_valid_time) seconds ago, the C(update_cache) gets skipped.

Returns:

  • (Boolean, nil)

    If C(update_cache) is specified and the last run is less or equal than I(cache_valid_time) seconds ago, the C(update_cache) gets skipped.



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

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)



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

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



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

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



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

attribute :dpkg_options

#force:yes, ...

Returns If C(yes), force installs/removes.

Returns:

  • (:yes, :no, nil)

    If C(yes), force installs/removes.



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

attribute :force

#install_recommends:yes, ...

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:

  • (:yes, :no, 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.



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

attribute :install_recommends

#nameString?

Returns A package name, 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. Note that the apt-get commandline supports implicit regex matches here but we do not because it can let typos through easier (If you typo C(foo) as C(fo) apt-get would install packages that have “fo” in their name with a warning and a prompt for the user. Since we don’t have warnings and prompts before installing we disallow this. Use an explicit fnmatch pattern if you want wildcarding).

Returns:

  • (String, nil)

    A package name, 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. Note that the apt-get commandline supports implicit regex matches here but we do not because it can let typos through easier (If you typo C(foo) as C(fo) apt-get would install packages that have “fo” in their name with a warning and a prompt for the user. Since we don’t have warnings and prompts before installing we disallow this. Use an explicit fnmatch pattern if you want wildcarding)



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

attribute :name

#only_upgradeBoolean?

Returns Only install/upgrade a package if it is already installed.

Returns:

  • (Boolean, nil)

    Only install/upgrade a package if it is already installed.



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

attribute :only_upgrade

#purgeBoolean?

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

Returns:

  • (Boolean, nil)

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



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

attribute :purge

#state:latest, ...

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:

  • (:latest, :absent, :present, :"build-dep", 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.



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

attribute :state

#update_cacheBoolean?

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:

  • (Boolean, 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.



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

attribute :update_cache

#upgrade:no, ...

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.

Returns:

  • (:no, :yes, :safe, :full, :dist, 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.



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

attribute :upgrade