This is such odd behavior
1. I am invoking puppet through vagrant provisioner
2. I am using puppetlabs/debian-7.8-64-puppet as the base image
The host machine in my case is Windows 7 - the following code worked fine:
file_line { "Append required NGINX parameters":
path => "/etc/nginx/fastcgi_params",
line => file("nginx/params.conf"),
}
But when running under windows 10 (or 8) puppet failed and complained about file paths - so we changed it to this:
file_line { "Append required NGINX parameters":
require => Package["nginx"],
path => "/etc/nginx/fastcgi_params",
line => file("/var/www/.vagrant/puppet/modules/nginx/files/params.conf"),
}
This seems to have corrected the issue in getting puppet to complete in Windows 7,8 and 10 - but now I have another issue cropping up and it has to do with Apache actually loading (even though there is no reference to apache anywhere in my puppet script.
Here is the entire puppet script:
#
# Install all required packages
#
$packages = [
"curl",
"nginx",
#"php5-gd",
#"php5-cli",
"php5-fpm",
"php5-ldap",
#"php5-mysql",
"mysql-server",
"htmldoc",
]
package { $packages:
ensure => present,
}
#
# Configure PHP-FPM
#
service { "php5-fpm":
ensure => running,
require => Package['php5-fpm'],
}
#
# Configure NGINX
#
service { "nginx":
require => Package["nginx"],
ensure => running,
enable => true
}
file { "/etc/nginx/sites-available/default":
ensure => "file",
require => Package["nginx"],
content => file("/var/www/.vagrant/puppet/modules/nginx/files/aerospace"),
}
file_line { "Append required Cadorath Aerospace NGINX parameters":
require => Package["nginx"],
path => "/etc/nginx/fastcgi_params",
line => file("/var/www/.vagrant/puppet/modules/nginx/files/params.conf"),
}
Whenever I uncomment php5-gd or php5-mysql - Apache is somehow magically loaded and takes precedence over NGINX???
I literally will uncomment that line - rebuild machine SSH and run a ps -aux and suddenly I see Apache not NGINX serving my pages
Why is this suddenly happening? Why is Apache being installed period? Is the base-image buggy? I used a newer version and it solved the original problem above - but ships with a version of PHP which deprecates an API which our still depends on - so I couldn't go down that path.
Ideas?
↧