diff --git a/REFERENCE.md b/REFERENCE.md index 7cc88c03..3c51151b 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -79,6 +79,7 @@ The following parameters are available in the `python` class: * [`umask`](#-python--umask) * [`manage_gunicorn`](#-python--manage_gunicorn) * [`manage_python_package`](#-python--manage_python_package) +* [`manage_dev_package`](#-python--manage_dev_package) * [`manage_venv_package`](#-python--manage_venv_package) * [`manage_pip_package`](#-python--manage_pip_package) * [`venv`](#-python--venv) @@ -192,6 +193,14 @@ manage the state for package python Default value: `true` +##### `manage_dev_package` + +Data type: `Boolean` + +manage the state of the python development package + +Default value: `true` + ##### `manage_venv_package` Data type: `Boolean` diff --git a/manifests/init.pp b/manifests/init.pp index 5b3c9fdf..b457edbd 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -19,6 +19,7 @@ # @param umask The default umask for invoked exec calls. # @param manage_gunicorn manage the state for package gunicorn # @param manage_python_package manage the state for package python +# @param manage_dev_package manage the state of the python development package # @param manage_venv_package manage the state for package venv # @param manage_pip_package manage the state for package pip # @@ -45,6 +46,7 @@ Python::Package::Ensure $gunicorn = 'absent', Boolean $manage_gunicorn = true, Boolean $manage_python_package = true, + Boolean $manage_dev_package = true, Boolean $manage_venv_package = $python::params::manage_venv_package, Boolean $manage_pip_package = $python::params::manage_pip_package, String[1] $gunicorn_package_name = $python::params::gunicorn_package_name, diff --git a/manifests/install.pp b/manifests/install.pp index 6a738435..5d25efda 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -53,7 +53,7 @@ } } - if $pythondev { + if $python::manage_dev_package and $pythondev { package { 'python-dev': ensure => $python::dev, name => $pythondev, @@ -179,7 +179,7 @@ } } - if $pythondev { + if $python::manage_dev_package and $pythondev { package { 'python-dev': ensure => $python::dev, name => $pythondev, @@ -196,7 +196,7 @@ } } - if $pythondev { + if $python::manage_dev_package and $pythondev { package { 'python-dev': ensure => $python::dev, name => $pythondev, diff --git a/spec/classes/python_spec.rb b/spec/classes/python_spec.rb index cca3ef65..d3bde4a4 100644 --- a/spec/classes/python_spec.rb +++ b/spec/classes/python_spec.rb @@ -34,6 +34,7 @@ let :params do { manage_python_package: false, + manage_dev_package: false, manage_pip_package: false, manage_venv_package: false } @@ -41,6 +42,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.not_to contain_package('python') } + it { is_expected.not_to contain_package('python-dev') } it { is_expected.not_to contain_package('pip') } it { is_expected.not_to contain_package('python-venv') } end