Skip to content

Commit 55b942d

Browse files
committed
Virtualenv exec resources tagged with 'python-virtualenv,' ordered in anchor pattern
1 parent 1613c24 commit 55b942d

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

manifests/init.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
anchor { 'python::begin': } ->
101101
class { 'python::install': } ->
102102
class { 'python::config': } ->
103+
Exec<| tag == 'python-virtualenv' |> ->
103104
anchor { 'python::end': }
104105

105106
# Allow hiera configuration of python resources

manifests/pyvenv.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
environment => $environment,
9292
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
9393
require => File[$venv_dir],
94+
tag => 'python-virtualenv',
9495
}
9596
} elsif $ensure == 'absent' {
9697
file { $venv_dir:

manifests/virtualenv.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
environment => $environment,
163163
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
164164
require => File[$venv_dir],
165+
tag => 'python-virtualenv',
165166
}
166167

167168
if $requirements {

0 commit comments

Comments
 (0)