Open rwaffen opened 5 months ago
Screenshots from PE 2016:
stage { 'pre': }
stage { 'post': }
stage { 'postpost': }
Stage['pre'] -> Stage['main'] -> Stage['post'] -> Stage['postpost']
class foo {
file { '/tmp/numbers':
ensure => 'file',
}
}
class { 'foo':
stage => 'pre',
}
class htop {
package { 'htop':
ensure => 'installed',
}
}
class { 'htop':
stage => 'pre',
}
class openssh {
package { 'openssh':
ensure => 'installed',
}
}
class { 'openssh':
stage => 'main',
}
class rangee {
$fpath = '/tmp/numbers'
range(0, 4000).each |$element| {
$require = if ($element % 2) == 0 {
[File[$fpath],Package['openssh']]
} else {
[File[$fpath],Package['htop']]
}
file_line { "${element}-${fpath}":
path => $fpath,
line => "${element}\n",
require => $require,
}
}
}
class { 'rangee':
stage => 'post',
}
class bash {
package { 'bash':
ensure => 'installed',
}
}
class { 'bash':
stage => 'postpost',
}
package { 'openssh':
ensure => 'installed',
}
package { 'htop':
ensure => 'installed',
}
file { '/tmp/numbers':
ensure => 'file',
}
$fpath = '/tmp/numbers'
range(0, 4000).each |$element| {
$require = if ($element % 2) == 0 {
[File[$fpath],Package['openssh']]
} else {
[File[$fpath],Package['htop']]
}
file_line { "${element}-${fpath}":
path => $fpath,
line => "${element}\n",
require => $require,
}
}
package { 'openssh':
ensure => 'installed',
}
package { 'htop':
ensure => 'installed',
}
file { '/tmp/numbers':
ensure => 'file',
}
$fpath = '/tmp/numbers'
range(0, 4000).each |$element| {
file_line { "${element}-${fpath}":
path => $fpath,
line => "${element}\n",
}
}
plain PE without custom code
cycle:
package { 'openssh':
require => Package['htop'],
}
package { 'htop':
require => Package['openssh'],
}
@oneiros I added a few catalogs + dot files, I hope that helps
@Sharpie wrote in the slack: