Whew! Glad it finally worked!
That slowness is very surprising and I don’t have any immediate hypotheses. Assuming the curl
responses were essentially immediate, I don’t know why the playbook’s http requests would be slower.
I was going to suggest disabling the Test Acme Challenges
task (as in this thread), given that ping.txt
was publicly accessible. But now your playbook has completed.
You probably still want to do some research on the problem, a post-mortem of sorts to figure out the problem so you can prevent it in the future. One starting point might be to check Nginx logs for problems:
srv/www/example.com/logs
/var/log/nginx
You could also check your server’s resource available. For example, make sure your server isn’t slowed to a crawl due to low disk space:
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 238M 0 238M 0% /dev
tmpfs 49M 5.5M 44M 12% /run
/dev/vda1 20G 4.4G 16G 23% /
tmpfs 245M 0 245M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 245M 0 245M 0% /sys/fs/cgroup
tmpfs 49M 0 49M 0% /run/user/1001
In the example above, /dev/vda1
has 16G available. If it were less than 4GB, I wouldn’t be surprised at slow-down, or difficulty serving requests.
Otherwise, you may have to just really brainstorm and research the possibilities, Maybe you’ll discover that the problem doesn’t occur on other wifi networks or a different Ansible control machine. I’m curious to know who your VPS provider is (e.g., DigitalOcean, AWS, Linode, etc).