Class: Ansible::Ruby::Modules::Apt
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Apt
- 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
-
#allow_unauthenticated ⇒ :yes, ...
Ignore if packages cannot be authenticated.
-
#autoclean ⇒ :yes, ...
If C(yes), cleans the local repository of retrieved package files that can no longer be downloaded.
-
#autoremove ⇒ :yes, ...
If C(yes), remove unused dependency packages for all module states except I(build-dep).
-
#cache_valid_time ⇒ Integer?
Update the apt cache if its older than the I(cache_valid_time).
-
#deb ⇒ String?
Path to a .deb package on the remote machine.,If :// in the path, ansible will attempt to download deb before installing.
-
#default_release ⇒ String?
Corresponds to the C(-t) option for I(apt) and sets pin priorities.
-
#dpkg_options ⇒ Array<String>, ...
Add dpkg options to apt command.
-
#force ⇒ :yes, ...
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.
-
#force_apt_get ⇒ :yes, ...
Force usage of apt-get instead of aptitude.
-
#install_recommends ⇒ Symbol?
Corresponds to the C(–no-install-recommends) option for I(apt).
-
#name ⇒ String?
A list of package names, like C(foo), or package specifier with version, like C(foo=1.0).
-
#only_upgrade ⇒ :yes, ...
Only upgrade a package if it is already installed.
-
#purge ⇒ :yes, ...
Will force purging of configuration files if the module state is set to I(absent).
-
#state ⇒ :absent, ...
Indicates the desired package state.
-
#update_cache ⇒ :yes, ...
Run the equivalent of C(apt-get update) before the operation.
-
#upgrade ⇒ :dist, ...
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.
Methods inherited from Base
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).
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.
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.
60 |
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 60 attribute :autoremove |
#cache_valid_time ⇒ Integer?
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).
24 |
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 24 attribute :cache_valid_time |
#deb ⇒ String?
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).
56 |
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 56 attribute :deb |
#default_release ⇒ String?
Returns 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_options ⇒ Array<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.
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.
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.
72 |
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 72 attribute :force_apt_get |
#install_recommends ⇒ Symbol?
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.
36 |
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 36 attribute :install_recommends |
#name ⇒ String?
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.
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.
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).
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.
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.
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.
48 |
# File 'lib/ansible/ruby/modules/generated/packaging/os/apt.rb', line 48 attribute :upgrade |