Git integration doesnot show any files

I successfully added a Git integration but can’t find my repos

I have added gitlab for Ansible integration , it shows success but the playbooks are not showing under plays

Hi @Paul_B what release are you on? Also, did you define your ‘Default Branch’ as either main or master? The screenshot looks not defined.

My current version is V. 6.0.1 , i also provided branch and tested but still same error

This may be linked with an issue resolved in 6.0.2. I believe if you did not have a master branch, it would not work. If you create a blank branch called ‘master’ or upgrade to 6.0.2 or 6.1.0 that should resolve it.

Even after upgrade , i am still facing same error
i see no playbooks but i can see subfolders in roles tab

Is it authenticated with a key or token? Token may need to go both in password and token fields depending on the git vendor.

Do you have restrictive settings on your token? I would have to double check with my gitlab but there’s something beyond read you need to fully sync with authentication.

i tried both Key and token method ,nothing worked out, i am going with default settings , have not modified anything , its newly deployed gitlab

@Paul_B can you modify the Roles Path and make it /roles. Let it sync and hopefully they reappear. That said, the page is display only and would not limit the calling of the playbooks.

Why do we need to Role path ? because i have some playbooks on the main branch as well inside subdirectories

Yes , surprisingly it worked , Thank you

I want to add option list then inputs to pass value to variable for an ansible playbook, can i do that ? because i also see group variable path and host variable path in the ansible integration page ? whets the use of that ?

Really those tabs are for display purposes to understand the inventory of files you have.

Yes you can use the inputs as variables in your code. This would be similar to how to utilize them within Python.

      SERVERTYPE: "{{ morpheus['instance']['layoutName'] }}"
      BACKUP: "{{ morpheus['customOptions']['steamBackup'] }}"

You can see an example with using Morpheus variables I built here

SERVERTYPE: “{{ morpheus[‘instance’][‘layoutName’] }}”
Here what is Morpheus ? from where its referring ?

When you run Ansible from Morpheus, we inject data into a file and we load that into Ansible via the variable morpheus. Depending on the contrext you run Ansible in, be it instance or local, you get different contents of the morpheus variable.

You can dump the variable in Ansible using -debug: var=morpheus to see what it contains.

Hi i used the syntex as you suggested but i am getting a en error

““The task includes an option with an undefined variable. The error was: {{ morpheus[‘customOptions’][‘Pool_Selection_Manual_Text’] }}: ‘dict object’ has no attribute ‘Pool_Selection_Manual_Text’\n\nThe error appears to be in '/var/opt/morpheus/morpheus-local/repo/git/ae9aa2c0c5ae07d846074aa893b04223/volume-provisioningg.yml””

Its my syntex
"pool_id: “{{ morpheus[‘customOptions’][‘Pool_Selection_Manual_Text’] }}” "