lvrfrc87/git-acp-ansible

couldn't resolve module/action 'git_acp'

DrunkMunki opened this issue · 2 comments

I have the below playbook, but it cant seem to find the "git_acp" module

    - name: SSH
      git_acp:
        token: topkengoeshere
        user: "me@mydomain.com"
        path: "{{ config_path }}"
        branch: master
        add: [ "." ]
        mode: ssh
        push_option: ci.skip
        url: "git@gitlab.ourdomain.local/router-configs/site.git"

error

ERROR! couldn't resolve module/action 'git_acp'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/root/config_backups/gitexport.yml': line 23, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


    - name: SSH
      ^ here

i confirm the module is shown under the collections list

root@netbox:~/config_backups# ansible-galaxy collection list

# /root/.ansible/collections/ansible_collections
Collection       Version
---------------- -------
lvrfrc87.git_acp 1.4.0
netbox.netbox    3.7.1

Added collection to main header in playbook, and is now working

- name: CONFIG BACKUP TO GIT ENABLED DIRECTORY
  hosts: all
  connection: network_cli
  ignore_errors: yes
  gather_facts: yes
  collections: lvrfrc87.git_acp

you could use the fqcn which means:

- name: your git task
  lvrfrc87.git_acp.git_acp:
    add: ["*"]
    ...