Comments (7)
@wesnick - Don't have time to gather context right now, but is the systemd config also managed by this role? If so, can we just change the 127.0.0.1 to localhost?
Otherwise, it would be okay to have some parts of /etc/default/varnish managed by this role (I thought I remember managing bits of it in the past)—I'd prefer to be surgical about it, e.g. using lineinfile
.
from ansible-role-varnish.
Also, it looks like we should be using the systemd config file (and not /etc/default/varnish) for Xenial: https://github.com/geerlingguy/ansible-role-varnish/blob/master/tasks/main.yml#L36-L45
from ansible-role-varnish.
I checked upstream. It looks like the reload script in the systemd config file is a holdover from init.d days
https://bugs.launchpad.net/ubuntu/+source/varnish/+bug/1573561
In this script the old /etc/default/varnish file is sourced
$ cat /usr/share/varnish/reload-vcl |grep defaults
defaults=/etc/default/varnish
# msg_defaults_not_readable: defaults
msg_defaults_not_readable="Error: %s is not readable\n"
# msg_defaults_not_there: defaults
msg_defaults_not_there="Error: %s does not exist\n"
# Load defaults file
if [ -f "$defaults" ]
if [ -r "$defaults" ]
. "$defaults"
printf >&2 "$msg_defaults_not_readable" $defaults
printf >&2 "$msg_defaults_not_there" $defaults
I propose a patch that will only affect xenial, do a lineinfile
on the line
defaults=/etc/default/varnish
and set it to
defaults=/etc/varnish/varnish.params
In reality this varnish.params file is not ever used by systemd, it is not loaded in the config file and even if it were, systemd does not do param expansion the way init.d scripts did.
http://unix.stackexchange.com/questions/216780/why-does-bash-parameter-expansion-not-work-inside-systemd-service-files
from ansible-role-varnish.
another interesting link
varnishcache/pkg-varnish-cache#24
from ansible-role-varnish.
I have implemented the above fix in a forked version of this repo and reload works great for me now. I am willing to roll a patch only targeting xenial and add a test. Just say the word.
from ansible-role-varnish.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
from ansible-role-varnish.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
from ansible-role-varnish.
Related Issues (20)
- Use 'latest' as package state HOT 2
- Systemd configuration overwritten on update HOT 2
- Use variables for all templated files HOT 3
- Complete listening support (-a) HOT 2
- Varnish 6.6 has a package for Ubuntu 20.04 Focal Fossa HOT 1
- Debian 10/11: varnish.service file defaults used instead of /etc/defaults/varnish HOT 3
- Ubuntu: install from the default repo instead of packagecloud
- systemd unit file in wrong location leads to problems after package updates
- Role doesn't support installation of additional Varnish packages
- Rocky Linux CI currently failing with 'All matches were filtered out by modular filtering' HOT 4
- Ubuntu 22 Jammy; packagecloud does not have release file HOT 1
- /usr/sbin/varnishreload: No such file or directory HOT 2
- "Ensure Varnish VMODs are installed" emits deprecation notice HOT 3
- "Master" released as a version HOT 1
- task "Ensure Varnish services are started and enabled on startup." is skipped on Ubuntu Bionic HOT 1
- Fix bare variable warning in 'Ensure Varnish services are started' task
- Varnish doesn't have package for Ubuntu 20.04 Focal Fossa HOT 16
- Add support for Debian 10 Buster
- Fix role installing Varnish 6.0.x from AppStream on CentOS 8 HOT 4
- Listen protocol not configurable HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-role-varnish.