Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
- Puppet >= 6.21.0 < 8.0.0
- , , , , , , , ,
Tasks:
- group_add
- group_add_user
- group_comment
- group_disable
Start using this module
Add this module to your Puppetfile:
mod 'zend-zendhq', '1.2.1'
Learn more about managing modules with a PuppetfileDocumentation
zend/zendhq Puppet Module
This Puppet module manages ZendHQ, a Zend product add-on for ZendPHP Enterprise.
Table of Contents
What zendhq affects
This module adds the ZendPHP package repositories and manages the ZendHQ service, which can be installed, uninstalled, started, stopped, and configured.
Usage
Using zendhq
to setup the ZendPHP repositories and install ZendHQ without
configuration is as simple as providing a Zend product license:
class { 'zendhq':
license_source => 'puppet:///modules/<MODULE_NAME>/zend/license',
}
Include settings to configure ZendHQ.
class { 'zendhq':
license_source => 'puppet:///modules/<MODULE_NAME>/zend/license',
settings => {
'zendhq.daemon_uri' => 'tcp://0.0.0.0:10090',
},
}
Creating a new group and user with read-only permissions using Bolt.
$ bolt task run zendhq::group_add group=readonly permissions='r zray,mon,conf,ct,jq' -t zendhq_server
$ # verify group creation and permissions
$ bolt task run zendhq::group_print group=readonly -t zendhq_server
$ bolt task run zendhq::user_add user=readonly_user password=readonly_password group=readonly -t zendhq_server
$ # verify user creation and permissions
$ bolt task run zendhq::user_print user=readonly_user -t zendhq_server
Tasks
Installation of ZendHQ comes with a helpful tool, zendhqctl
, for managing
groups, users, and their permissions. While this CLI could be called with
Puppet's exec
functionality, this module comes with tasks for all the
zendhqctl
commands, making them easy to call with
PE
or Bolt.
Please see the reference below for a list of tasks in this module.
Reference
See REFERENCE.md
Reference
Table of Contents
Classes
Public Classes
zendhq
: Manage ZendHQ package, service, and configuration
Private Classes
zendhq::config
: Configure zendhq.ini settingszendhq::package
: Manage the zendhqd packagezendhq::service
: Manage zendhq service
Defined types
Private Defined types
zendhq::config::setting
: Configure a zendhqd.ini setting
Tasks
group_add
: Create a groupgroup_add_user
: Add one or more users to a groupgroup_comment
: Set a comment for a given groupgroup_disable
: Disable a given groupgroup_enable
: Enable a given groupgroup_list
: List the defined groupsgroup_print
: List the permissions for a given groupgroup_remove
: Remove a given groupgroup_remove_user
: Remove one or more users from a groupgroup_set_permissions
: Set the permissions for a given groupuser_add
: Create a useruser_add_group
: Add a user to one or more groupsuser_comment
: Set a comment for a given useruser_disable
: Disable a given useruser_enable
: Enable a given useruser_list
: List the defined usersuser_password
: Change the password for a given useruser_print
: List the permissions for a given useruser_remove
: Remove a given useruser_remove_group
: Remove a user from one or more groups
Classes
zendhq
Manage ZendHQ package, service, and configuration
- See also
- https://help.zend.com/zendphp/current/content/zendhq/zendhq_service_configuration.htm
- for possible settings
- https://help.zend.com/zendphp/current/content/zendhq/zendhq_service_configuration.htm
Examples
Basic ZendHQ setup
class { 'zendhq':
license_source => 'puppet:///modules/<MODULE_NAME>/zend/license'
}
Setup ZendHQ with some configuration
class { 'zendhq':
license_source => 'puppet:///modules/<MODULE_NAME>/zend/license',
settings => {
'zendhq.daemon_uri' => 'tcp://0.0.0.0:10090',
},
}
Parameters
The following parameters are available in the zendhq
class:
license_source
settings
service_provider
service_ensure
service_name
service_enable
package_ensure
package_name
license_source
Data type: String[1]
Source path or puppet URL to license file
settings
Data type: Optional[Hash[String, Variant[String, Integer]]]
Hash of settings and their values
Default value: undef
service_provider
Data type: Optional[String[1]]
System service provider, like systemctl; auto-detected if left undef
Default value: undef
service_ensure
Data type: Enum['running', 'stopped']
Enure value for the ZendHQ service
Default value: 'running'
service_name
Data type: String[1]
Name of ZendHQ service
Default value: 'zendhqd'
service_enable
Data type: Boolean
Whether the service should be enabled or not
Default value: true
package_ensure
Data type: String[1]
Ensure value for the ZendHQ package
Default value: 'installed'
package_name
Data type: String[1]
Name of the ZendHQ package
Default value: 'zendhqd'
Tasks
group_add
Create a group
Supports noop? false
Parameters
group
Data type: String[1]
Group to create
comment
Data type: Optional[String[1]]
Optional group comment
permissions
Data type: Optional[String[1]]
Optional permission mask, such as 'r zray,mon,conf,ct,jq'
group_add_user
Add one or more users to a group
Supports noop? false
Parameters
group
Data type: String[1]
Group to add one or more users to
user
Data type: String[1]
User(s) to add to the group
group_comment
Set a comment for a given group
Supports noop? false
Parameters
group
Data type: String[1]
Group to set comment for
comment
Data type: Optional[String[1]]
Comment for given group
group_disable
Disable a given group
Supports noop? false
Parameters
group
Data type: String[1]
Group to disable
group_enable
Enable a given group
Supports noop? false
Parameters
group
Data type: String[1]
Group to enable
group_list
List the defined groups
Supports noop? false
group_print
List the permissions for a given group
Supports noop? false
Parameters
group
Data type: String[1]
Group to list the permissions of
group_remove
Remove a given group
Supports noop? false
Parameters
group
Data type: String[1]
Group to remove
group_remove_user
Remove one or more users from a group
Supports noop? false
Parameters
group
Data type: String[1]
Group to remove one or more users from
user
Data type: String[1]
User(s) to remove from the group
group_set_permissions
Set the permissions for a given group
Supports noop? false
Parameters
group
Data type: String[1]
Group to set the permissions of
permissions
Data type: String[1]
Permission mask, such as '-wx zray,mon,conf,ct,jq'
user_add
Create a user
Supports noop? false
Parameters
user
Data type: String[1]
User to create
password
Data type: Optional[String[1]]
Password for user
group
Data type: Optional[String[1]]
Optional group or comma-separated list of groups to add user to
comment
Data type: Optional[String[1]]
Optional user comment
disable
Data type: Optional[String[1]]
Optional disable user flag
user_add_group
Add a user to one or more groups
Supports noop? false
Parameters
user
Data type: String[1]
User to add to group(s)
group
Data type: String[1]
Group or comma-separated list of groups
user_comment
Set a comment for a given user
Supports noop? false
Parameters
user
Data type: String[1]
User to set comment for
comment
Data type: Optional[String[1]]
Comment for given user
user_disable
Disable a given user
Supports noop? false
Parameters
user
Data type: String[1]
User to disable
user_enable
Enable a given user
Supports noop? false
Parameters
user
Data type: String[1]
User to enable
user_list
List the defined users
Supports noop? false
user_password
Change the password for a given user
Supports noop? false
Parameters
user
Data type: String[1]
User to change password for
password
Data type: String[1]
Password for given user
user_print
List the permissions for a given user
Supports noop? false
Parameters
user
Data type: String[1]
User to list the permissions of
user_remove
Remove a given user
Supports noop? false
Parameters
user
Data type: String[1]
User to remove
user_remove_group
Remove a user from one or more groups
Supports noop? false
Parameters
user
Data type: String[1]
User to remove from group(s)
group
Data type: String[1]
Group or comma-separated list of groups
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Tasks in this module release
group_list
List the defined groups
user_list
List the defined users
Changelog
All notable changes to this project will be documented in this file.
v1.2.1 (2024-07-24)
Breaking changes
- Changed the
permission_mask
option topermissions
inzendhq::group_add
andzendhq::group_set_permissions
tasks
Features
- Updated docs to reflect
zendhq::
tasks
v1.2.0 (2024-07-18)
Features
- Add tasks for zendhqctl user management commands
v1.0.1 (2022-11-11)
Bugfix
- Simple typo fix
v1.0.0 (2022-11-11)
Initial release
Features
- Manage ZendHQ service installation, configuration, and status
Dependencies
- puppetlabs/stdlib (>= 4.16.0 < 9.0.0)
- puppetlabs/apt (>= 4.4.0 < 9.0.0)
- puppetlabs/inifile (>= 1.4.1 < 6.0.0)
- zend/zend_common (>= 1.0.0 < 8.0.0)
MIT License Copyright (c) 2022 Zend Technologies Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.