Class: Ansible::Ruby::Modules::Pear

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

Overview

Manage PHP packages with the pear package manager.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name

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

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

Constructor Details

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

Instance Method Details

#executableObject?

Returns Path to the pear executable.

Returns:

  • (Object, nil)

    Path to the pear executable



20
# File 'lib/ansible/ruby/modules/generated/packaging/language/pear.rb', line 20

attribute :executable

#nameArray<String>, String

Returns Name of the package to install, upgrade, or remove.

Returns:

  • (Array<String>, String)

    Name of the package to install, upgrade, or remove.



12
# File 'lib/ansible/ruby/modules/generated/packaging/language/pear.rb', line 12

attribute :name

#state:present, ...

Returns Desired state of the package.

Returns:

  • (:present, :absent, :latest, nil)

    Desired state of the package.



16
# File 'lib/ansible/ruby/modules/generated/packaging/language/pear.rb', line 16

attribute :state

#to_hObject



11
12
13
14
15
16
17
# File 'lib/ansible/ruby/modules/custom/packaging/language/pear.rb', line 11

def to_h
  from_super = super
  pear_module = from_super[:pear]
  # Pear seems to insist on things being a CSV
  pear_module[:name] = pear_module[:name].join(',')
  from_super
end