Skip to content

Commit

Permalink
puppet-lint: remove anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Apr 4, 2020
1 parent b1bb343 commit 5be3832
Showing 1 changed file with 22 additions and 34 deletions.
56 changes: 22 additions & 34 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,23 @@
$final_cli_settings = $real_settings + $cli_settings

if $manage_repos {
class { 'php::repo': }
-> Anchor['php::begin']
contain php::repo
}

anchor { 'php::begin': }
-> class { 'php::packages': }
class { 'php::packages': }
-> class { 'php::cli':
settings => $final_cli_settings,
}
-> anchor { 'php::end': }
contain php::packages
contain php::cli

# Configure global PHP settings in php.ini
if $facts['os']['family'] != 'Debian' {
Class['php::packages']
-> class {'php::global':
settings => $real_settings,
}
-> Anchor['php::end']
contain php::global
}

if $fpm { contain 'php::fpm' }
Expand All @@ -197,48 +196,37 @@
fail('Enabling both cli and embedded sapis is not currently supported')
}

Anchor['php::begin']
-> class { 'php::embedded':
settings => $real_settings,
}
-> Anchor['php::end']
class { 'php::embedded':
settings => $real_settings,
}
contain php::embedded
}
if $dev {
Anchor['php::begin']
-> class { 'php::dev': }
-> Anchor['php::end']
contain php::dev
}
if $composer {
Anchor['php::begin']
-> class { 'php::composer':
proxy_type => $proxy_type,
proxy_server => $proxy_server,
}
-> Anchor['php::end']
class { 'php::composer':
proxy_type => $proxy_type,
proxy_server => $proxy_server,
}
}
if $pear {
Anchor['php::begin']
-> class { 'php::pear':
ensure => $pear_ensure,
}
-> Anchor['php::end']
class { 'php::pear':
ensure => $pear_ensure,
}
}
if $phpunit {
Anchor['php::begin']
-> class { 'php::phpunit': }
-> Anchor['php::end']
contain php::phpunit
}
if $apache_config {
Anchor['php::begin']
-> class { 'php::apache_config':
settings => $real_settings,
}
-> Anchor['php::end']
class { 'php::apache_config':
settings => $real_settings,
}
contain php::apache_config
}

create_resources('php::extension', $real_extensions, {
require => Class['php::cli'],
before => Anchor['php::end']
})

# On FreeBSD purge the system-wide extensions.ini. It is going
Expand Down

0 comments on commit 5be3832

Please sign in to comment.