Open gj02ib65 opened 4 years ago
@gj02ib65 Since the issue isn't resolved in this repo, I'll re-open the issue so that it can finally be resolved.
is there a reason not to pull the same commit? also the error_log directory is not created at all (not even any relevant code exists), which makes it fail starting the service on some distros that don't create it from package automatically
is there a reason not to pull the same commit? also the error_log directory is not created at all (not even any relevant code exists), which makes it fail starting the service on some distros that don't create it from package automatically
@ghormoon No reason but someone needs to look at that commit to check the reordering of states as well. The make_dirs
=> makedirs
typo should be done in all cases, of course.
I think the thought behind the reordeing is that to have the directory already ready when creating php-fpm.conf (as it likely is in a directory above), as it might fail too, if the folder is missing (sort of similar case as the log one, but less likely as those are usually in packages), so kinda hacky solution for that (it would be cleaner to do it explicitly, would make one more state, but in case someone has the pools outside the php/fpm folder where php-fpm.conf is, it will handle that edgecase)
I think the thought behind the reordeing is that to have the directory already ready when creating php-fpm.conf (as it likely is in a directory above), as it might fail too, if the folder is missing (sort of similar case as the log one, but less likely as those are usually in packages), so kinda hacky solution for that (it would be cleaner to do it explicitly, would make one more state, but in case someone has the pools outside the php/fpm folder where php-fpm.conf is, it will handle that edgecase)
@ghormoon Yes, perhaps using requisites is the right way, whether reordering or not. The solution shouldn't be a hack, ultimately.
Describe the bug
While using php-formula I found that directories were not being created and discovered a typo of
make_dirs
rather thanmakedirs
. I have changed and that now works.Setup
Steps to reproduce the bug
Expected behaviour
Versions report
As mentioned in #200.
Additional context
Found that I needed to re-arrange the code a bit and create the directory before using managed files. This is also in the same file, there are 2 places where I moved the file.directory block in front of the file.managed section. Following is the updated
config.sls
:Optional: How can this template be improved?