Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
- Puppet >= 5.0.0 < 8.0.0
- Debian,FreeBSD
Tasks:
- change_user_password
- database_backup
- database_delete
- database_duplicate
Start using this module
Documentation
puppet-odoo
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_rename
: Rename an odoo databasedatabase_restore
: Restore 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
Data type: Enum['10.0', '11.0', '12.0', '13.0']
The version of odoo to install
manage_repo
Data type: Boolean
Manage the odoo reposiroty
Default value: true
manage_package
Data type: Boolean
Manage the odoo package
Default value: true
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: Optional[String]
Database user name
Default value: 'odoo'
db_password
Data type: Optional[Variant[Boolean,Sensitive]]
Database password
Default value: false
pg_path
Data type: Optional[String]
PostgreSQL executable path
Default value: undef
db_host
Data type: Optional[Variant[Boolean,String]]
Database host
Default value: false
db_port
Data type: Optional[Variant[Boolean,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_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
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.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
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 < 5.0.0)
- puppetlabs-inifile (>= 4.0.0 < 5.0.0)