I have done this exact task before for a custom credential. We can talk over there
Get Outlook for iOS<https://aka.ms/o0ukef> ________________________________ From: [email protected] <[email protected]> on behalf of Yantram Cloud <[email protected]> Sent: Sunday, January 10, 2021 9:04:45 PM To: [email protected] <[email protected]> Subject: Re: [ansible-project] Ansible Tower/AWX Credential Management Thanks, i will post this in the AWX group. However, the problem is not just limited to git. there are scenarios where I need to access the credentials especially the username which is in credentials. Thanks, Jayant On Sun, Jan 10, 2021 at 1:23 PM Dick Visser <[email protected]<mailto:[email protected]>> wrote: Hi This is the ansible list, your question will get more/better response on the dedicated awx list. Give that a try. Btw i would use public keys or tokens btw for interaction with GitHub, definitely not user password of the actual account. On Sun, 10 Jan 2021 at 08:36, Yantram Cloud <[email protected]<mailto:[email protected]>> wrote: All, I am looking a way to access credentials that are setup in Ansible Tower credentials. The scenario I am testing is to clone a private git repo. the way I found to pass the username and password are as follows. --- - hosts: all gather_facts: no become: yes tasks: - name: install git package apt: name: git - name: Get updated files from git repository git: repo: "https://{{ githubuser | urlencode }}:{{ githubpassword | urlencode }}@github.com/privrepo.git<http://github.com/privrepo.git>" dest: /tmp Now in this, I want to use the githubuser and githubpassword to be passed from the credentials i have setup under the Credentials in Ansible Tower or a way to pass the credentials securely to my playbook? Thanks, Jayant -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4e2b5dfe-f1c7-4975-9c78-ce7d8c534cd8n%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/4e2b5dfe-f1c7-4975-9c78-ce7d8c534cd8n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/hG7wij4MVPQ/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwMGMw3TttvAoQGHuu7pbpxB7QsbBU9pznQseTqn1wSvCw%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CAL8fbwMGMw3TttvAoQGHuu7pbpxB7QsbBU9pznQseTqn1wSvCw%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ4U50VP7vmvQcMvtj0N49gXOsJjpPj32qv9Tr1kUs1PM_8Qvw%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CAJ4U50VP7vmvQcMvtj0N49gXOsJjpPj32qv9Tr1kUs1PM_8Qvw%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/SY4PR01MB57700F1F43B480AE2FBF118AADAC0%40SY4PR01MB5770.ausprd01.prod.outlook.com.
