# Newbie Collections Issue

**URL:** <https://forum.ansible.com/t/newbie-collections-issue/2307>\
**Category:** Get Help\
**Tags:** playbook, collections, getting-started, ansible-core\
**Created:** [November 12, 2023, 2:09pm UTC](https://forum.ansible.com/t/newbie-collections-issue/2307 "2023-11-12T14:09:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![geordieracer](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/geordieracer/32/1509_2.png) [@geordieracer](https://forum.ansible.com/u/geordieracer)\
**Post date:** [November 12, 2023, 2:09pm UTC](https://forum.ansible.com/t/newbie-collections-issue/2307/1 "2023-11-12T14:09:52Z")

</div>

I am new to Ansible and looking to use some collections in my playbook (other than the built in ones). The issue I have is that if i run a playbook to show what collections are available, the list is a very small subset of all of the collections that appear to be available on my control plane.

If I ssh to my control plane as the user i am running ansible as ‘ansible’ and execute the command  
‘’’  
ansible-galaxy collection list  
‘’’  
then i get a full list of collections.

If I run the playbook below against the control plane as the user ‘ansible’ I only see about 12 collections

## ‘’’

- name: List All Installed Collections  
hosts: localhost  
remote\_user: ansible  
gather\_facts: false  
tasks:
  - name: Use ansible-galaxy to list collections  
command: ansible-galaxy collection list  
register: galaxy\_output

  - name: Display installed collections  
debug:  
var: galaxy\_output.stdout\_lines  
‘’’

If I check the ansible config on the host with  
‘’’  
ansible-config list  
‘’’  
I can see that the COLLECTIONS\_PATHS default is as I’d expect and if i check those locations i see all collections.

I’m running ansible v2.10.8

Whatever i do i can’t get my playbook to see all collections. Am I fundamentally misunderstanding how this should work?

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [November 13, 2023, 3:53pm UTC](https://forum.ansible.com/t/newbie-collections-issue/2307/2 "2023-11-13T15:53:49Z")

</div>

Are the collections only accessible to the `ansible` user? The implicit `localhost` uses the `local` connection which doesn’t use the `remote_user`.  
[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/local\_connection.html#notes](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/local_connection.html#notes)

You could use become plugins:

```auto
- hosts: localhost
  become: yes
  become_user: ansible # default is root
  become_method: sudo # default become plugin

```

Available become methods can be listed with `ansible-doc --list -t become` and options seen with `ansible-doc -t become $PLUGIN`.
