Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 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
- Puppet >= 7.0.0 < 9.0.0
- ,
Tasks:
- change_user_password
- database_backup
- database_delete
- database_duplicate
Start using this module
Add this module to your Puppetfile:
mod 'opuscodium-odoo', '4.1.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-odoo
Table of Contents
Module description
This Puppet module allows managing odoo with Puppet
Usage
Basic usage
Usage in a profile is straightforward, the only mandatory parameter being the version of odoo you want to install:
class profile::odoo {
class { 'odoo':
version => '13.0',
}
}
Usage with odoo-enterprise
Odoo-enterprise is a collection of non-free plugins installed on top of odoo which provide extra features.
The easiest way is probably to fork https://github.com/odoo/enterprise in your organization, and add deploy keys for your servers in your copy of the repo.
Then rely on vcsrepo to fetch the proper version of the repository and configure it in your profile:
class profile::odoo (
Enum['10.0', '11.0', '12.0', '13.0'] $version,
) {
$enterprise_path = '/opt/odoo/enterprise'
$enterprise_revision = $version ? {
'10.0' => '123456',
'11.0' => '234567',
'12.0' => '345678',
'13.0' => '456789',
}
vcsrepo { $enterprise_path:
ensure => present,
provider => 'git',
source => "git@github.com:${organization}/odoo-enterprise.git",
revision => $enterprise_revision,
notify => Class['odoo::service'],
force => true,
}
class { 'odoo':
version => $version,
addons_path => [
$enterprise_path,
'/usr/lib/python3/dist-packages/odoo/addons',
],
}
}
Reference
Table of Contents
Classes
Public Classes
odoo
: Configure Odoo
Private Classes
odoo::config
: Manage odoo configurationodoo::dependencies
: Manage odoo dependenciesodoo::package
: Manage odoo packageodoo::repo
: Manage odoo repositoryodoo::service
: Manage odoo serviceodoo::wkhtmltox
: Manage wkhtmltox
Resource types
odoo_config
: setting name to manage from odoo.conf
Tasks
change_user_password
: Change the password of an userdatabase_backup
: Backup an odoo databasedatabase_delete
: Delete an odoo databasedatabase_duplicate
: Duplicate an odoo databasedatabase_init
: Initialize an odoo databasedatabase_rename
: Rename an odoo databasedatabase_restore
: Restore an odoo databasedatabase_update
: Update an odoo databasedatabases_list
: List odoo databaseslist_users
: List users of an odoo database
Classes
odoo
Configure Odoo
Parameters
The following parameters are available in the odoo
class:
version
wkhtmltopdf
manage_package
package_name
package_ensure
package_mark
admin_passwd
csv_internal_sep
reportgz
without_demo
import_partial
pidfile
addons_path
upgrades_paths
server_wide_modules
data_dir
http_interface
http_port
longpolling_port
http_enable
proxy_mode
dbfilter
test_enable
test_file
test_tags
screencasts
screenshots
logfile
syslog
log_handler
log_db
log_db_level
log_level
email_from
smtp_server
smtp_port
smtp_ssl
smtp_user
smtp_password
db_name
db_user
db_password
pg_path
db_host
db_port
db_sslmode
db_maxconn
db_template
language
translate_out
translate_in
overwrite_existing_translations
translate_modules
list_db
osv_memory_count_limit
osv_memory_age_limit
max_cron_threads
unaccent
geoip_database
workers
limit_memory_soft
limit_memory_hard
limit_time_cpu
limit_time_real
limit_time_real_cron
limit_request
version
Data type: Enum['10.0', '11.0', '12.0', '13.0', '14.0', '15.0', '16.0', '17.0', 'system']
The version of odoo to install
Default value: undef
wkhtmltopdf
Data type: Optional[Enum['wkhtmltox']]
How to manage wkhtmltopdf
Default value: undef
manage_package
Data type: Boolean
Manage the odoo package
Default value: true
package_name
Data type: String[1]
The name of the odoo package
Default value: 'odoo'
package_ensure
Data type: String
Ensure value for the odoo package
Default value: 'present'
package_mark
Data type: Optional[Enum['hold', 'none']]
Mark value for the odoo package
Default value: undef
admin_passwd
Data type: Optional[Sensitive]
Password that allows database operations
Default value: undef
csv_internal_sep
Data type: Optional[String]
Legacy (now unused)
Default value: undef
reportgz
Data type: Optional[String]
Legacy (now unused)
Default value: undef
without_demo
Data type: Optional[Variant[Array[String],Boolean]]
Disable loading demo data for modules to be installed (comma-separated, use \"all\" for all modules).
Default value: undef
import_partial
Data type: Optional[String]
Use this for big data importation, if it crashes you will be able to continue at the current state. Provide a filename to store intermediate importation states.
Default value: undef
pidfile
Data type: Optional[Stdlib::Absolutepath]
File where the server pid will be stored
Default value: undef
addons_path
Data type: Optional[Array[String]]
Additional addons paths
Default value: undef
upgrades_paths
Data type: Optional[Array[String]]
Additional upgrades path
Default value: undef
server_wide_modules
Data type: Optional[Array[String]]
List of server-wide modules
Default value: undef
data_dir
Data type: Optional[String]
Directory where to store Odoo data
Default value: undef
http_interface
Data type: Optional[String]
Listen interface address for HTTP services
Default value: undef
http_port
Data type: Optional[Integer]
Listen port for the main HTTP service
Default value: undef
longpolling_port
Data type: Optional[Integer]
Listen port for the longpolling HTTP service
Default value: undef
http_enable
Data type: Optional[Boolean]
Disable the HTTP and Longpolling services entirely
Default value: undef
proxy_mode
Data type: Optional[Boolean]
Activate reverse proxy WSGI wrappers
Default value: undef
dbfilter
Data type: Optional[String]
Regular expressions for filtering available databases for Web UI
Default value: undef
test_enable
Data type: Optional[Boolean]
Enable unit tests
Default value: undef
test_file
Data type: Optional[String]
Launch a python test file
Default value: undef
test_tags
Data type: Optional[Array[String]]
List of spec to filter which tests to execute
Default value: undef
screencasts
Data type: Optional[String]
Screencasts will go in $screencasts/<db_name>/screencasts
Default value: undef
screenshots
Data type: Optional[String]
Screenshots will go in $screenshots/<db_name>/screenshots
Default value: undef
logfile
Data type: Optional[Stdlib::Absolutepath]
File where the server log will be stored
Default value: undef
syslog
Data type: Optional[Boolean]
Send the log to the syslog server
Default value: undef
log_handler
Data type: Optional[String]
Setup a handler of PREFIX:LEVEL
Default value: undef
log_db
Data type: Optional[String]
Logging database
Default value: undef
log_db_level
Data type: Optional[String]
Logging database level
Default value: undef
log_level
Data type:
Optional[Enum[
'info',
'debug_rpc',
'warn',
'test',
'critical',
'debug_sql',
'error',
'debug',
'debug_rpc_answer',
'notset',
]]
Level of the logging
Default value: undef
email_from
Data type: Optional[String]
SMTP email address for sending email
Default value: undef
smtp_server
Data type: Optional[String]
SMTP server for sending email
Default value: undef
smtp_port
Data type: Optional[Integer]
SMTP port
Default value: undef
smtp_ssl
Data type: Optional[Boolean]
Encrypt SMTP connections with StARTTLS
Default value: undef
smtp_user
Data type: Optional[String]
SMTP username for sending email
Default value: undef
smtp_password
Data type: Optional[Sensitive]
SMTP password for sending email
Default value: undef
db_name
Data type: Optional[String]
Database name
Default value: undef
db_user
Data type: String[1]
Database user name
Default value: 'odoo'
db_password
Data type: Variant[Boolean[false],Sensitive]
Database password
Default value: false
pg_path
Data type: Optional[String]
PostgreSQL executable path
Default value: undef
db_host
Data type: Variant[Boolean[false],String]
Database host
Default value: false
db_port
Data type: Variant[Boolean[false],Integer]
Database port
Default value: false
db_sslmode
Data type:
Optional[Enum[
'disable',
'allow',
'prefer',
'require',
'verify-ca',
'verify-full',
]]
Database ssl connection mode
Default value: undef
db_maxconn
Data type: Optional[Integer]
Maximum number of physical connections to PostgreSQL
Default value: undef
db_template
Data type: Optional[String]
Custom database template to create a new database
Default value: undef
language
Data type: Optional[String]
Language of the translation file
Default value: undef
translate_out
Data type: Optional[Boolean]
Export all sentences to be translated to a CSV file, a PO file or a TGZ archive and exit
Default value: undef
translate_in
Data type: Optional[Boolean]
Import a CSV or a PO file with translations and exit
Default value: undef
overwrite_existing_translations
Data type: Optional[Boolean]
Overwrites existing translation terms on updating a module or importing a CSV or a PO file
Default value: undef
translate_modules
Data type: Optional[Array[String]]
Modules to export
Default value: undef
list_db
Data type: Optional[Boolean]
Disable the ability to obtain or view the list of databases
Default value: undef
osv_memory_count_limit
Data type: Optional[Integer]
Force a limit on the maximum number of records kept in the virtual osv_memory tables
Default value: undef
osv_memory_age_limit
Data type: Optional[Float]
Force a limit on the maximum age of records kept in the virtual osv_memory
Default value: undef
max_cron_threads
Data type: Optional[Integer]
Maximum number of threads processing concurrently cron jobs
Default value: undef
unaccent
Data type: Optional[Boolean]
Use the unaccent function provided by the database when available
Default value: undef
geoip_database
Data type: Optional[Stdlib::Absolutepath]
Absolute path to the GeoIP database file
Default value: undef
workers
Data type: Optional[Integer]
Number of workers
Default value: undef
limit_memory_soft
Data type: Optional[Integer]
Maximum allowed virtual memory per worker, when reached the worker be reset after the current request
Default value: undef
limit_memory_hard
Data type: Optional[Integer]
Maximum allowed virtual memory per worker, when reached, any memory allocation will fail
Default value: undef
limit_time_cpu
Data type: Optional[Integer]
Maximum allowed CPU time per request
Default value: undef
limit_time_real
Data type: Optional[Integer]
Maximum allowed Real time per request
Default value: undef
limit_time_real_cron
Data type: Optional[Integer]
Maximum allowed Real time per cron job
Default value: undef
limit_request
Data type: Optional[Integer]
Maximum number of request to be processed per worker
Default value: undef
Resource types
odoo_config
setting name to manage from odoo.conf
Properties
The following properties are available in the odoo_config
type.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
value
The value of the setting to define
Parameters
The following parameters are available in the odoo_config
type.
name
namevar
setting name to manage from odoo.conf
provider
The specific backend to use for this odoo_config
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
show_diff
Valid values: true
, md5
, false
Whether to display differences when the setting changes.
Default value: true
Tasks
change_user_password
Change the password of an user
Supports noop? false
Parameters
database
Data type: String[1]
Odoo database name
login
Data type: String[1]
User to change the password to
password
Data type: String[1]
New password for the user (encrypted)
database_backup
Backup an odoo database
Supports noop? false
Parameters
name
Data type: String
Odoo database name
filename
Data type: String
Remote filename for the backup
format
Data type: Enum['zip']
Backup format
database_delete
Delete an odoo database
Supports noop? false
Parameters
name
Data type: String
Odoo database name
database_duplicate
Duplicate an odoo database
Supports noop? false
Parameters
oldname
Data type: String
Name of the existing Odoo database
newname
Data type: String
Name of the new Odoo database
database_init
Initialize an odoo database
Supports noop? false
Parameters
name
Data type: String[1]
Odoo database name
unaccent
Data type: Boolean
Use the unaccent function provided by the database
database_rename
Rename an odoo database
Supports noop? false
Parameters
oldname
Data type: String
Old database name (must exist)
newname
Data type: String
New database name (must not exist)
database_restore
Restore an odoo database
Supports noop? false
Parameters
name
Data type: String
Odoo database name
filename
Data type: String
Remote filename for the backup
copy
Data type: Boolean
database_update
Update an odoo database
Supports noop? false
Parameters
database
Data type: String[1]
Odoo database name
databases_list
List odoo databases
Supports noop? false
list_users
List users of an odoo database
Supports noop? false
Parameters
database
Data type: String[1]
Odoo database name
contains
Data type: Optional[String[1]]
Filter reported users by login
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
databases_list
List odoo databases
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v4.1.0 (2024-06-06)
Implemented enhancements:
- Add support for Ubuntu 22.04 #80 (smortex)
- Add support for odoo 17.0 #79 (smortex)
- Add support for Debian 12 #77 (smortex)
Fixed bugs:
v4.0.0 (2024-04-12)
Breaking changes:
v3.0.2 (2023-12-11)
Fixed bugs:
v3.0.1 (2023-07-07)
Fixed bugs:
v3.0.0 (2023-07-04)
Breaking changes:
Implemented enhancements:
- Add support for Puppet 8 #67 (smortex)
- Relax dependencie's version requirements #63 (smortex)
- Add support for odoo 16.0 #60 (smortex)
v2.2.0 (2023-02-17)
Implemented enhancements:
- Allow latest version of apt #55 (smortex)
- Add Bolt tasks to initialize / update odoo databases #54 (smortex)
Merged pull requests:
v2.1.0 (2021-12-02)
Implemented enhancements:
- Add support for odoo 14.0 and 15.0 on Debian Bullseye #51 (smortex)
- Add support for odoo 15.0 #49 (smortex)
Fixed bugs:
2.0.1 (2021-09-15)
Fixed bugs:
2.0.0 (2021-09-15)
Breaking changes:
Implemented enhancements:
- Make wkhtmltox package management optional #45 (smortex)
- Allow to install Debian 11's odoo-14 package #43 (smortex)
- Add support for Debian 11 #40 (smortex)
Merged pull requests:
1.2.1 (2021-05-14)
Fixed bugs:
1.2.0 (2021-05-04)
Implemented enhancements:
- Extend the odoo fact with a list of databases and installed addons #36 (smortex)
- Update dependencies #35 (smortex)
1.1.0 (2021-02-18)
Implemented enhancements:
- Add support for Ubuntu 20.04 #33 (smortex)
- Report incompatible Odoo and OS versions #31 (smortex)
- Add support for Odoo 14.0 #29 (smortex)
- Add support for Debian #28 (smortex)
Fixed bugs:
1.0.2 (2021-02-10)
Fixed bugs:
- Fix advertised OS support #26 (smortex)
- Remove explicit data_provider from metadata.json #24 (smortex)
1.0.1 (2021-01-13)
Implemented enhancements:
- Add REFERENCE.md #20 (neomilium)
- Add a task to change an user password #18 (smortex)
- Add a task to list users #17 (smortex)
- Report database.uuid in odoo::databases_list task #16 (smortex)
Fixed bugs:
1.0.0 (2020-12-21)
Implemented enhancements:
- Rework module tasks #12 (smortex)
- Improve databases listing #10 (smortex)
- Add tasks for databases management #5 (smortex)
- Use wkhtmltox 0.12.5 with Odoo 13 #3 (smortex)
- Rely on package mark released with Puppet 6.13.0 #2 (smortex)
Fixed bugs:
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppet-archive (>= 4.0.0 < 8.0.0)
- puppetlabs-apt (>= 1.0.0 < 10.0.0)
- puppetlabs-inifile (>= 4.0.0 < 7.0.0)
- puppetlabs-stdlib (>= 9.0.0 < 10.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.