From 6eda9eefdc21289ed80bf8ed49bb9b4956f8e458 Mon Sep 17 00:00:00 2001 From: Chao Zhang Date: Thu, 8 Dec 2016 12:35:10 +0100 Subject: [PATCH] Allow hiera config for dotfiles --- README.md | 6 ++++++ manifests/init.pp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 36ecec4e..cdbb98e3 100644 --- a/README.md +++ b/README.md @@ -302,6 +302,12 @@ python::python_pips: virtualenv: "/opt/env1" "coverage": virtualenv: "/opt/env2" +python::python_dotfiles: + "/var/lib/jenkins/.pip/pip.conf": + config: + global: + index-url: "https://mypypi.acme.com/simple/" + extra-index-url: "https://pypi.risedev.at/simple/" ``` ### Using SCL packages from RedHat or CentOS diff --git a/manifests/init.pp b/manifests/init.pp index 8b3caf30..6a973097 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -81,6 +81,7 @@ $python_virtualenvs = { }, $python_pyvenvs = { }, $python_requirements = { }, + $python_dotfiles = { }, $use_epel = $python::params::use_epel, $rhscl_use_public_repository = $python::params::rhscl_use_public_repository, ) inherits python::params{ @@ -123,6 +124,7 @@ validate_re($gunicorn, ['^(absent|present|latest)$']) } + validate_hash($python_dotfiles) validate_bool($manage_gunicorn) validate_bool($use_epel) @@ -143,5 +145,6 @@ create_resources('python::pyvenv', $python_pyvenvs) create_resources('python::virtualenv', $python_virtualenvs) create_resources('python::requirements', $python_requirements) + create_resources('python::dotfile', $python_dotfiles) }