Use local ansible.cfg

Since moving playbooks to their own subdirectory they were no longer
able to find the roles. Add a local `ansible.cfg` which configures the
default paths for roles, modules, and collections. Also change the
location of the `win_git` module to the new local directory.
This commit is contained in:
Kenneth Benzie 2023-04-27 23:00:00 +01:00
parent 5ac1081f90
commit c4d4f5395a
3 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
external external
modules/win_git*

5
ansible.cfg Normal file
View File

@ -0,0 +1,5 @@
[defaults]
collections_path = collections
library = modules
roles_path = roles
stdout_callback = yaml

View File

@ -36,7 +36,7 @@
- name: copy win_git files to ansible modules directory - name: copy win_git files to ansible modules directory
copy: copy:
src: '~/.config/local/external/ansible-win_git/{{item}}' src: '~/.config/local/external/ansible-win_git/{{item}}'
dest: '~/.ansible/plugins/modules/{{item}}' dest: '~/.config/local/modules/{{item}}'
with_items: with_items:
- win_git.ps1 - win_git.ps1
- win_git.py - win_git.py