Class: Ansible::Ruby::Modules::Apt
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Apt
- 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
-
#allow_unauthenticated ⇒ :yes, ...
Ignore if packages cannot be authenticated.
-
#autoremove ⇒ Boolean?
If C(yes), remove unused dependency packages for all module states except I(build-dep).
-
#cache_valid_time ⇒ Boolean?
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.
-
#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, ...
If C(yes), force installs/removes.
-
#install_recommends ⇒ :yes, ...
Corresponds to the C(–no-install-recommends) option for I(apt).
-
#name ⇒ String?
A package name, like C(foo), or package specifier with version, like C(foo=1.0).
-
#only_upgrade ⇒ Boolean?
Only install/upgrade a package if it is already installed.
-
#purge ⇒ Boolean?
Will force purging of configuration files if the module state is set to I(absent).
-
#state ⇒ :latest, ...
Indicates the desired package state.
-
#update_cache ⇒ Boolean?
Run the equivalent of C(apt-get update) before the operation.
-
#upgrade ⇒ :no, ...
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.
Methods inherited from Base
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.
43 |
# File 'lib/ansible/ruby/modules/generated/core/packaging/os/apt.rb', line 43 attribute :allow_unauthenticated |
#autoremove ⇒ Boolean?
Returns 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_time ⇒ Boolean?
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.
23 |
# File 'lib/ansible/ruby/modules/generated/core/packaging/os/apt.rb', line 23 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).
55 |
# File 'lib/ansible/ruby/modules/generated/core/packaging/os/apt.rb', line 55 attribute :deb |
#default_release ⇒ String?
Returns 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_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.
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.
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.
35 |
# File 'lib/ansible/ruby/modules/generated/core/packaging/os/apt.rb', line 35 attribute :install_recommends |
#name ⇒ String?
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).
11 |
# File 'lib/ansible/ruby/modules/generated/core/packaging/os/apt.rb', line 11 attribute :name |
#only_upgrade ⇒ Boolean?
Returns 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 |
#purge ⇒ Boolean?
Returns 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.
15 |
# File 'lib/ansible/ruby/modules/generated/core/packaging/os/apt.rb', line 15 attribute :state |
#update_cache ⇒ Boolean?
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.
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.
47 |
# File 'lib/ansible/ruby/modules/generated/core/packaging/os/apt.rb', line 47 attribute :upgrade |