Skip to content

Commit

Permalink
Virtualenv exec resources tagged with 'python-virtualenv,' ordered in…
Browse files Browse the repository at this point in the history
… anchor pattern
  • Loading branch information
sorreltree committed Jul 21, 2015
1 parent 1613c24 commit 55b942d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions manifests/pyvenv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions manifests/virtualenv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 55b942d

Please sign in to comment.