Class: Google::Apis::OsconfigV1beta::Package
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV1beta::Package
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/osconfig_v1beta/classes.rb,
generated/google/apis/osconfig_v1beta/representations.rb,
generated/google/apis/osconfig_v1beta/representations.rb
Overview
Package is a reference to the software package to be installed or removed. The
agent on the VM instance uses the system package manager to apply the config.
These are the commands that the agent uses to install or remove packages. Apt
install: apt-get update && apt-get -y install package1 package2 package3
remove: apt-get -y remove package1 package2 package3
Yum install: yum -y
install package1 package2 package3
remove: yum -y remove package1 package2
package3
Zypper install: zypper install package1 package2 package3
remove:
zypper rm package1 package2
Googet install: googet -noconfirm install
package1 package2 package3
remove: googet -noconfirm remove package1
package2 package3
Instance Attribute Summary collapse
-
#desired_state ⇒ String
The desired_state the agent should maintain for this package.
-
#manager ⇒ String
Type of package manager that can be used to install this package.
-
#name ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Package
constructor
A new instance of Package.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Package
Returns a new instance of Package.
1320 1321 1322 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1320 def initialize(**args) update!(**args) end |
Instance Attribute Details
#desired_state ⇒ String
The desired_state the agent should maintain for this package. The default is
to ensure the package is installed.
Corresponds to the JSON property desiredState
1301 1302 1303 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1301 def desired_state @desired_state end |
#manager ⇒ String
Type of package manager that can be used to install this package. If a system
does not have the package manager, the package is not installed or removed no
error message is returned. By default, or if you specify ANY
, the agent
attempts to install and remove this package using the default package manager.
This is useful when creating a policy that applies to different types of
systems. The default behavior is ANY.
Corresponds to the JSON property manager
1311 1312 1313 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1311 def manager @manager end |
#name ⇒ String
Required. The name of the package. A package is uniquely identified for
conflict validation by checking the package name and the manager(s) that the
package targets.
Corresponds to the JSON property name
1318 1319 1320 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1318 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1325 1326 1327 1328 1329 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1325 def update!(**args) @desired_state = args[:desired_state] if args.key?(:desired_state) @manager = args[:manager] if args.key?(:manager) @name = args[:name] if args.key?(:name) end |