geerlingguy / ansible-role-certbot

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

role not compatible with ansible 2.7 since snap #150

Closed wschoot closed 3 years ago

wschoot commented 3 years ago

It seems that the addition of snap breaks things for Debian 10's default Ansible (2.7.7) which has no support for snap (added to Ansible in 2.8 according to https://docs.ansible.com/ansible/2.8/modules/snap_module.html#snap-module). This may break other older Ansible installations as well and this should be reflected in the minimal ansible version (which is now set to 2.4 on galaxy).

wouter@tosca:~/git/tosca[master]$ ansible-playbook main.yml 
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '/home/wouter/.ansible/roles/geerlingguy.certbot/tasks/install-with-snap.yml': line 25, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Install certbot via snap.
  ^ here
wouter@tosca:~/git/tosca[master]$ ansible --version
ansible 2.7.7
  config file = /home/wouter/git/tosca/ansible.cfg
  configured module search path = ['/home/wouter/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
wouter@tosca:~/git/tosca[master]$ dpkg -l ansible
 Desired=Unknown/Install/Remove/Purge/Hold
 | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
 |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
 ||/ Name           Version      Architecture Description
 +++-==============-============-============-===============================================================
 ii  ansible        2.7.7+dfsg-1 all          Configuration management, deployment, and task execution system
wouter@tosca:~/git/tosca[master]$ ansible-galaxy list geerlingguy.certbot
- geerlingguy.certbot, 4.0.0
wouter@tosca:~/git/tosca[master]$ 
geerlingguy commented 3 years ago

Ansible 2.7 is no longer supported; I would recommend installing Ansible via pip to get a newer version.

wschoot commented 3 years ago

Hi Jeff,

Thanks for your insightfull remark, I'm gonna update Ansible. I do however feel it's fair to point out, as a closing note, that the minimum ansible version (2.4) for this module should be raised on the galaxy page. Thanks for all your work!