geerlingguy / ansible-role-certbot

Ansible Role - Certbot (for Let's Encrypt)
https://galaxy.ansible.com/geerlingguy/certbot/
MIT License
789 stars 351 forks source link

Ensure snapd is started immediately #146

Closed scottsb closed 3 years ago

scottsb commented 3 years ago

Just using enabled: true means it will start at boot, but it won't start immediately with just that. You need state: started to be the equivalent of --now.

geerlingguy commented 3 years ago

Hmm, still giving:

TASK [geerlingguy.certbot : Install certbot via snap.] *************************
  fatal: [instance]: FAILED! => {"changed": false, "channel": "stable", "classic": true, "cmd": "sh -c \"/bin/snap install --classic certbot\"", "msg": "Ooops! Snap installation failed while executing 'sh -c \"/bin/snap install --classic certbot\"', please examine logs and error output for more details.", "rc": 1, "stderr": "error: cannot perform the following tasks:\n- Setup snap \"snapd\" (11107) security profiles (cannot reload udev rules: exit status 2\nudev output:\n)\n", "stderr_lines": ["error: cannot perform the following tasks:", "- Setup snap \"snapd\" (11107) security profiles (cannot reload udev rules: exit status 2", "udev output:", ")"], "stdout": "", "stdout_lines": []}
scottsb commented 3 years ago

@geerlingguy I think that's a different issue than this PR was meant to solve. This PR was just supposed to be making sure that snapd starts right away in addition to starting at boot.

The error you show seems like it might be a snapd bug incompatibility with the containerization you're using for testing: https://bugs.launchpad.net/snapd/+bug/1712808

scottsb commented 3 years ago

@geerlingguy FYI, it looks like this was merged into your other branch but then got wiped out in that branch (maybe by a force push?). Didn't make it to master with the other PR. Was that intentional?

geerlingguy commented 3 years ago

Gah... oops. Can you re-file the PR to master? I didn't realize this wasn't a rebase on top of my other branch.