ansible-galaxy git clone failures

1,736 views
Skip to first unread message

Prasoon Majumdar

unread,
Aug 11, 2017, 8:50:40 AM8/11/17
to Ansible Project
Hello,

I was trying to clone roles using ansible-galaxy cli from private repo, 

requirements file : working.yml


  name: watever.fpm
  version: master

ansible-galaxy install --role-file=ansible-galaxy.yml --roles-path="${PWD}/roles/" --force

But its throwing errors like:


[WARNING]: - xxxxfpm was NOT installed successfully: - command git clone https://g...@git.xxxxxx.com/devops/ansible-role-fpm.git
xxxx.fpm failed in directory /tmp/tmpGS0PhX (rc=128)

ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.

I tried different combinations of "git+ssh" but nothing worked, i can easily clone it directory using "git clone" way but ansible-galaxy way is not working, ideas ???

Papanito

unread,
Mar 7, 2020, 1:38:27 PM3/7/20
to Ansible Project
I face the same problem but using roles from git is failing for me as well (private as well as public repo).

Also indications from https://github.com/ansible/ansible/issues/8937 dit not help - the issue refers to ansible 1.8, wheres I am using 2.9.5

Dick Visser

unread,
Mar 8, 2020, 1:21:24 AM3/8/20
to ansible...@googlegroups.com

Hi


Thanks for using ansible. To answer your question more information is needed. Could you please describe clearly all of the below:


- What goal you are trying to achieve.

- How you are doing this.

- What problems you encounter.

- Which commands did you run, and what actual output did you get (copied as plain text - not as screenshots, images, or other binary attachments).

- What do the relevant inventory/tasks/playbooks/code/variables look like.

- The output of ‘ansible --version’



--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b3d376e8-6ec0-4df8-b9f9-f3502a78eea0%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Papanito

unread,
Mar 8, 2020, 6:04:14 AM3/8/20
to Ansible Project
I have a `requirements.yml` which contains among other roles, roles which should be consumed directly from github/gitlab

- src: geerlingguy.docker
- src: dev-sec.ssh-hardening
- src: m4rcu5nl.zerotier-one

# own roles
# name: papanito.rsyslog
# scm: git
# version: master
name: papanito.rsyslog
path: roles
scm: git
version: master
# accept_hostkey: yes

installing the requirements fails

$ ansible-galaxy install -r requirements.yml -vvvv
ansible-galaxy 2.9.5
  config file = /home/
papanito/Workspaces/infrastructure/ansible.cfg
  configured module search path = ['/home/papanito/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  executable location = /usr/bin/ansible-galaxy
  python version = 3.8.1 (default, Jan 22 2020, 06:38:00) [GCC 9.2.0]
Using /home/
papanito/Workspaces/infrastructure/ansible.cfg as config file
Reading requirement file at 'requirements.yml'
found role {'src': 'geerlingguy.docker', 'name': 'geerlingguy.docker', 'version': '', 'scm': None} in yaml file
found role {'src': 'dev-sec.ssh-hardening', 'name': 'dev-sec.ssh-hardening', 'version': '', 'scm': None} in yaml file
found role {'src': 'm4rcu5nl.zerotier-one', 'name': 'm4rcu5nl.zerotier-one', 'version': '', 'scm': None} in yaml file
found role {'name': 'papanito.rsyslog', 'scm': 'git', 'version': 'master'} in yaml file
Processing role geerlingguy.docker
[WARNING]: - geerlingguy.docker (2.5.3) is already installed - use --force to change version to unspecified
Processing role dev-sec.ssh-hardening
[WARNING]: - dev-sec.ssh-hardening (7.0.0) is already installed - use --force to change version to unspecified
Processing role m4rcu5nl.zerotier-one
[WARNING]: - m4rcu5nl.zerotier-one (v1.2.2) is already installed - use --force to change version to unspecified
Processing role papanito.rsyslog
[WARNING]: - papanito.rsyslog was NOT installed successfully: - command /usr/bin/git clone papanito.rsyslog papanito.rsyslog failed in directory
/home/aedu/.ansible/tmp/ansible-local-914052zr2sg8jg/tmpp1mc9csj (rc=128)

To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.

Stefan Hornburg (Racke)

unread,
Mar 8, 2020, 8:55:08 AM3/8/20
to ansible...@googlegroups.com
On 3/8/20 11:04 AM, Papanito wrote:
> I have a `requirements.yml` which contains among other roles, roles which should be consumed directly from github/gitlab
>
> - src: geerlingguy.docker
> - src: dev-sec.ssh-hardening
> - src: m4rcu5nl.zerotier-one
>
> # own roles
> # - scr: git+https://g...@github.com/papanito/ansible-role-rsyslog.git
> # name: papanito.rsyslog
> # scm: git
> # version: master
> - scr: https://github.com/papanito/ansible-role-rsyslog.git
> name: papanito.rsyslog
> path: roles
> scm: git
> version: master
> # accept_hostkey: yes

You are using scr instead of src, which looks like a typo to me.

Regards
Racke

>
> installing the requirements fails
>
> $ansible-galaxy install -r requirements.yml -vvvv
> https://g...@git.xxxxxx.com/devops/ansible-role-fpm.git <https://g...@git.xxxxxx.com/devops/ansible-role-fpm.git>
> xxxx.fpm failed in directory /tmp/tmpGS0PhX (rc=128)
>
> ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
>
> I tried different combinations of "git+ssh" but nothing worked, i can easily clone it directory using "git
> clone" way but ansible-galaxy way is not working, ideas ???
>
> --
> 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 ansible...@googlegroups.com
> <javascript:>.
> <https://groups.google.com/d/msgid/ansible-project/b3d376e8-6ec0-4df8-b9f9-f3502a78eea0%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 the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/ef9e1acb-f2a4-4e96-b65e-a41d151d1c36%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ef9e1acb-f2a4-4e96-b65e-a41d151d1c36%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

signature.asc

Papanito

unread,
Mar 8, 2020, 9:09:02 AM3/8/20
to Ansible Project
Yeah right, I really didn't spot that! Thanks a lot
Reply all
Reply to author
Forward
0 new messages