From c4d4f5395a04576c7c030f5c3f82051d0debba82 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 27 Apr 2023 23:00:00 +0100 Subject: [PATCH] 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. --- .gitignore | 1 + ansible.cfg | 5 +++++ roles/wsl/tasks/main.yaml | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 ansible.cfg diff --git a/.gitignore b/.gitignore index 5446323..0b80e62 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ external +modules/win_git* diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..e90bc90 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,5 @@ +[defaults] +collections_path = collections +library = modules +roles_path = roles +stdout_callback = yaml diff --git a/roles/wsl/tasks/main.yaml b/roles/wsl/tasks/main.yaml index 82cf7c5..4b8fdcf 100644 --- a/roles/wsl/tasks/main.yaml +++ b/roles/wsl/tasks/main.yaml @@ -36,7 +36,7 @@ - name: copy win_git files to ansible modules directory copy: src: '~/.config/local/external/ansible-win_git/{{item}}' - dest: '~/.ansible/plugins/modules/{{item}}' + dest: '~/.config/local/modules/{{item}}' with_items: - win_git.ps1 - win_git.py