Ema has submitted this change and it was merged.
Change subject: Reload nginx upon config file modification
......................................................................
Reload nginx upon config file modification
We want puppet to fail in case of nginx configuration file errors.
Run `service nginx reload` upon configuration file modification.
Change-Id: Id0315273791ee22328ba36076fabe5a2fc8c450a
---
M manifests/init.pp
M manifests/site.pp
2 files changed, 6 insertions(+), 0 deletions(-)
Approvals:
Elukey: Looks good to me, but someone else must approve
Ema: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/init.pp b/manifests/init.pp
index 3ffa8df..fbbc8a8 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -57,6 +57,11 @@
hasrestart => true,
}
+ exec { 'nginx-reload':
+ command => '/usr/sbin/service nginx reload',
+ refreshonly => true,
+ }
+
file { [ '/etc/nginx/conf.d', '/etc/nginx/sites-available',
'/etc/nginx/sites-enabled' ]:
ensure => ensure_directory($ensure),
recurse => true,
diff --git a/manifests/site.pp b/manifests/site.pp
index cfcbca1..09944f4 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -39,6 +39,7 @@
content => $content,
source => $source,
tag => 'nginx', # workaround PUP-2689, can remove w/ puppetmaster
3.6.2+
+ notify => Exec['nginx-reload'],
}
file { "/etc/nginx/sites-enabled/${basename}":
--
To view, visit https://gerrit.wikimedia.org/r/295937
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id0315273791ee22328ba36076fabe5a2fc8c450a
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet/nginx
Gerrit-Branch: master
Gerrit-Owner: Ema <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Elukey <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Southparkfan <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits