# Cannot find google secret manager module in ansible

**URL:** <https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773>\
**Category:** Get Help\
**Tags:** gcp\
**Created:** [February 9, 2024, 6:17am UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773 "2024-02-09T06:17:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![prkpushp](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/prkpushp/32/2242_2.png) [@prkpushp](https://forum.ansible.com/u/prkpushp)\
**Post date:** [February 9, 2024, 6:17am UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/1 "2024-02-09T06:17:03Z")

</div>

I am trying to Write some data to the GCP Secret manager using my account which is already authenticated. I am using this playbook.

- name: Add secret to Google Cloud Secret Manager  
hosts: localhost  
gather\_facts: no  
tasks:
  - name: Set secret value  
set\_fact:  
secret\_value: “my-secret-value”

  - name: Add secret version  
google.cloud.gcp\_secret\_manager\_secret\_version:  
name: “projects/{{ gcp\_project }}/secrets/{{ secret\_name }}”  
data: “{{ secret\_value }}”  
state: present  
delegate\_to: localhost

However this is not able to locate the module google.cloud.gcp\_secret\_manager\_secret\_version. I cannot find any module related to secrets in cloud.google.

ERROR! couldn’t resolve module/action ‘google.cloud.gcp\_secret\_manager\_secret\_version’. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in ‘/home/ansible/win-playbooks/win\_ad/secretmain.yml’: line 10, column 7, but may  
be elsewhere in the file depending on the exact syntax problem.

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [February 9, 2024, 7:56am UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/2 "2024-02-09T07:56:31Z")

</div>

Is this what you are looking for?

[https://github.com/seralepo/ansible-gcp-secret-manager](https://github.com/seralepo/ansible-gcp-secret-manager)

---

<div class="post-metadata">

**Author:** ![prkpushp](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/prkpushp/32/2242_2.png) [@prkpushp](https://forum.ansible.com/u/prkpushp)\
**Post date:** [February 9, 2024, 10:40am UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/3 "2024-02-09T10:40:07Z")

</div>

This is written in Go. I am using python modules under ansible collection. Do you have something in python?

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [February 9, 2024, 10:49am UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/4 "2024-02-09T10:49:41Z")

</div>

Try searching GitHub? That’s what I did, it isn’t something I’ve used.

There doesn’t seem to be anything matching [`gcp_secret_manager_secret_version` on Ansible Galaxy](https://galaxy.ansible.com/ui/search/?keywords=gcp_secret_manager_secret_version).

What is the source of the playbook you are using?

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [February 9, 2024, 2:52pm UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/5 "2024-02-09T14:52:46Z")

</div>

I don’t think there’s such a module in `google.cloud`. At least, I don’t see one in the [list of modules](https://docs.ansible.com/ansible/9/collections/google/cloud/index.html).

There’s a [PR about a gcp\_secret\_manager module](https://github.com/ansible-collections/google.cloud/pull/578) which might be what you’re looking for, but it’s not merged yet.

---

<div class="post-metadata">

**Author:** ![copolycube](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/copolycube/32/4477_2.png) [@copolycube](https://forum.ansible.com/u/copolycube)\
**Post date:** [August 15, 2024, 10:24pm UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/6 "2024-08-15T22:24:38Z")

</div>

At last, it was merged, but not clear when it will be released ☹

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [August 16, 2024, 3:52pm UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/7 "2024-08-16T15:52:23Z")

</div>

I’ve recently opened an issue to ask for a [new release](https://github.com/ansible-collections/google.cloud/issues/642) but didn’t get an answer yet. I’ve added that users are waiting for this module, but I’m not sure if this helps.

@gundalow Do you think you have better ways to contact the maintainers than me? I’d like to avoid creating a vote on removing this collection and _then_ you [present some people](http://forum.ansible.com/t/6574/7) who say they’ll work on it. If you have a more direct connection, I think you should (try to) use it now.

---

<div class="post-metadata">

**Author:** ![gundalow](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gundalow/32/99_2.png) [@gundalow](https://forum.ansible.com/u/gundalow)\
**Post date:** [August 19, 2024, 9:44am UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/8 "2024-08-19T09:44:23Z")

</div>

> [@mariolenz](#):
>
> @gundalow Do you think you have better ways to contact the maintainers than me? I’d like to avoid creating a vote on removing this collection and _then_ you [present some people](http://forum.ansible.com/t/6574/7) who say they’ll work on it. If you have a more direct connection, I think you should (try to) use it now.

Thanks for the ping, I appreciate this, and as you say it’s a better way to work.

The people I used to know have moved on to other projects. I’ve asked internally to see if we’ve got any contacts. I’ll let you know.

---

<div class="post-metadata">

**Author:** ![gundalow](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gundalow/32/99_2.png) [@gundalow](https://forum.ansible.com/u/gundalow)\
**Post date:** [August 20, 2024, 10:13am UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/9 "2024-08-20T10:13:07Z")

</div>

There should be a collection release in the next month or two.

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [August 20, 2024, 3:29pm UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/10 "2024-08-20T15:29:16Z")

</div>

Cool! Thanks @gundalow! I’ll keep it on my list and tick it off once the release is there.

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [August 27, 2024, 4:24pm UTC](https://forum.ansible.com/t/cannot-find-google-secret-manager-module-in-ansible/3773/11 "2024-08-27T16:24:00Z")

</div>

There has been a new release today both on [GitHub](https://github.com/ansible-collections/google.cloud/releases/tag/v1.4.1) and [Galaxy](https://galaxy.ansible.com/ui/repo/published/google/cloud/?version=1.4.1) which seems to contain a new module gcp\_secret\_manager. Maybe this helps you.

If you don’t install the collection directly but use the Ansible community package, I’m afraid you have to wait another two weeks. ETA for Ansible 9.10.0 / 10.4.0 is September 10.
