Skip to content

Commit d156355

Browse files
author
Tim Meusel
committed
fix dependency cycle
1 parent 02035a0 commit d156355

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

manifests/unicorn.pp

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,27 +72,31 @@
7272
package {['policycoreutils', 'checkpolicy']:
7373
ensure => 'latest',
7474
} ->
75-
file { 'selinux template':
75+
file {'selinux template':
7676
path => '/tmp/nginx.te',
7777
ensure => file,
7878
content => template('puppet/unicorn_selinux_template'),
7979
notify => Exec['building_selinux_module_from_template'],
80-
} ->
81-
exec { 'building_selinux_module_from_template':
80+
}
81+
exec {'building_selinux_module_from_template':
8282
path => [ "/usr/bin", "/usr/local/bin" ],
8383
command => 'checkmodule -M -m -o /tmp/nginx.mod /tmp/nginx.te',
8484
refreshonly => true,
85-
} ->
86-
exec { 'building selinux policy package from module':
87-
path => [ "/usr/bin", "/usr/local/bin" ],
88-
command => 'semodule_package -o /tmp/nginx.pp -m /tmp/nginx.mod',
89-
} ->
90-
file { "/usr/share/selinux/targeted/nginx.pp":
85+
notify => Exec['building_selinux_policy_package_from_module'],
86+
}
87+
exec {'building_selinux_policy_package_from_module':
88+
path => [ "/usr/bin", "/usr/local/bin" ],
89+
command => 'semodule_package -o /tmp/nginx.pp -m /tmp/nginx.mod',
90+
refreshonly => true,
91+
}
92+
file {'/usr/share/selinux/targeted/nginx.pp':
9193
source => '/tmp/nginx.pp',
92-
} ->
93-
selmodule{'nginx':
94+
require => Exec['building_selinux_policy_package_from_module'],
95+
}
96+
selmodule {'nginx':
9497
ensure => 'present',
9598
syncversion => true,
99+
require => File['/usr/share/selinux/targeted/nginx.pp'],
96100
}
97101
}
98102
# hacky vhost

0 commit comments

Comments
 (0)