From 55b942d2ec90482bd6ef402a48534f2806852b26 Mon Sep 17 00:00:00 2001 From: Michael Bacon Date: Tue, 21 Jul 2015 11:11:59 -0400 Subject: [PATCH] Virtualenv exec resources tagged with 'python-virtualenv,' ordered in anchor pattern --- manifests/init.pp | 1 + manifests/pyvenv.pp | 1 + manifests/virtualenv.pp | 1 + 3 files changed, 3 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 27ecf09d..cacc34ae 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -100,6 +100,7 @@ anchor { 'python::begin': } -> class { 'python::install': } -> class { 'python::config': } -> + Exec<| tag == 'python-virtualenv' |> -> anchor { 'python::end': } # Allow hiera configuration of python resources diff --git a/manifests/pyvenv.pp b/manifests/pyvenv.pp index a49b166a..7d22b438 100644 --- a/manifests/pyvenv.pp +++ b/manifests/pyvenv.pp @@ -91,6 +91,7 @@ environment => $environment, unless => "grep '^[\\t ]*VIRTUAL_ENV=[\\\\'\\\"]*${venv_dir}[\\\"\\\\'][\\t ]*$' ${venv_dir}/bin/activate", #Unless activate exists and VIRTUAL_ENV is correct we re-create the virtualenv require => File[$venv_dir], + tag => 'python-virtualenv', } } elsif $ensure == 'absent' { file { $venv_dir: diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index 0e4f0b8a..4ea29771 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -162,6 +162,7 @@ environment => $environment, unless => "grep '^[\\t ]*VIRTUAL_ENV=[\\\\'\\\"]*${venv_dir}[\\\"\\\\'][\\t ]*$' ${venv_dir}/bin/activate", #Unless activate exists and VIRTUAL_ENV is correct we re-create the virtualenv require => File[$venv_dir], + tag => 'python-virtualenv', } if $requirements {