drone-plugins / drone-ansible

Drone plugin to provision via Ansible
http://plugins.drone.io/drone-plugins/drone-ansible
Apache License 2.0
31 stars 44 forks source link

Ansible community.general no longer included #56

Open h-phil opened 1 year ago

h-phil commented 1 year ago

Some time ago we moved from ansible to ansible-core (https://github.com/drone-plugins/drone-ansible/commit/6610bf7e77cfaf30e334ad8ff6ca89b018e3e35e) and no longer include the Community General Collection.

latest: Pulling from dockerhub/plugins/ansible
Digest: sha256:a8346771a68afe741786fce1801443cbf17cac98256b97118a347e52d2db5d8c
Status: Image is up to date for myinternalregistry/dockerhub/plugins/ansible:latest
$ ansible --version
ansible [core 2.14.0]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.11.3 (main, May 10 2023, 12:26:31) [GCC 12.2.1 20220924] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = False
$ ansible-playbook --inventory ansible/inventory/uat.yml --syntax-check ansible/playbook.yml
ERROR! couldn't resolve module/action 'community.general.ufw'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/drone/src/ansible/roles/ufw/tasks/main.yml': line 21, column 4, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

 - name: set logging
   ^ here
exit status 4

Is there a specific reason we no longer use the ansible package? Is the intended way to use the galaxy property?