You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the changes in PR #35 which break the wp-settings.php require out into a multi-line if statement, repeated provisioner runs add more and more surrounding if statements. I attempted to play with the file_line configuration for about an hour but couldn't find any combination of flags or changes to the match value that would prevent that.
I then tried replacing that resource with a sed call:
I do not understand why this variant does not work: I'd expect the '^' to ensure that the regex was applied to text starting that line, but intead this does not run on an unmodified wp-config.php.
# Configure Chassis' wp-config.php per the WP Core Development guide:
# http://docs.chassis.io/en/latest/guides/#wordpress-core-development
file_line { 'adjust chassis wp-config.php':
path => '/vagrant/wp-config.php',
append_on_no_match => false,
multiple => true,
line => "if ( ! defined( 'WP_CLI' ) ) {\n\trequire_once( ABSPATH . 'wp-settings.php' );\n}",
match => '^require_once.*ABSPATH.*wp-settings.php',
# Configure wp-config.php before installing WordPress.
before => Chassis::Wp[ $config['hosts'][0] ],
}
Due to the changes in PR #35 which break the
wp-settings.php
require out into a multi-line if statement, repeated provisioner runs add more and more surroundingif
statements. I attempted to play with thefile_line
configuration for about an hour but couldn't find any combination of flags or changes to thematch
value that would prevent that.I then tried replacing that resource with a
sed
call:but that (while it works on the command line) fails in puppet with the error
This is annoying, but it's not the end of the world, so I'm going to cut off my troubleshooting and open this issue to revisit instead.
The text was updated successfully, but these errors were encountered: