ansible-galaxy (ansible2.0.0) : backwards uncompatibility (anisble1.9.4)

69 views
Skip to first unread message

Nicolas Dupont-Jubien

unread,
Mar 8, 2016, 5:15:09 AM3/8/16
to Ansible Project
Summary:

Before Ansible2, we used ansible-galaxy program to assembly our project workspace (See above a sample ot requirements.yml file)

ansible-galaxy install -f -r requirements.yml


The directories path/name were then created or updated and we were able to use ansible-galaxy for other items than roles (i.e. plugins, modules).

  • It was working offline (we are behind a firewall)
  • It was easy to share Ansible code inside our company.
  • It was possible to use different SCM for the code (Gitlab of Dev Teams, Gitlab of Ops Teams...)

Unfortunately, since version 2, ansible-galaxy has been entirely refactored.
=> So we overrides this behaviour by replacing ansible-galaxy.py (Ansible2+) by ansible-galaxy.py file from Ansible 1.9.4

Our questions are, will the galaxy design change to be able :

  • To deal with other objects than roles (param: path) ?
  • To deal with different url of Galaxy (Sources from Dev, sources from Ops...) ?
  • To work offline ?


Ansible Version: 2
ansible 2.0.0.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides

Ansible Configuration: requirements.yml
#----------------
# Useful  plugins
#----------------

- src: git+https://gitlab/ansible/plugin_exit_on_failure.git
  version: v0.2
  path: callback_plugins
  name: exit_on_failure


- src: git+https://gitlab/ansible/plugin_tail.git
  version: v0.1
  path: filter_plugins
  name: tail

- src: git+http://gitlab/ansible/plugin_keepass.git
  version: v0.2
  path: lookup_plugins
  name: keepass

#------------
# Modules
#------------

- src: git+http://gitlab/ansible/module_fs.git
  version: v0.3
  path: library
  name: fs

#----------
# Roles
#----------

- src: git+https://gitlab2/ansible/role_gate.git
  version: remotes/origin/test
  path: roles
  name: role_gate

- src: git+https://gitlab2/ansible/role_prerequis.git
  path: roles
  name: role_prerequis
 
Environment:

N/A



Thanks a lot,
Nicolas

Brian Coca

unread,
Mar 8, 2016, 11:51:39 AM3/8/16
to ansible...@googlegroups.com
This was a bug in 1.9, it should have never allowed requirements files to arbitrarily overwrite paths on the users's machine.

----------
Brian Coca

Nicolas Dupont-Jubien

unread,
Mar 8, 2016, 2:57:54 PM3/8/16
to ansible...@googlegroups.com, ansible...@googlegroups.com
Thanks for the answer Brian. 

But what about the offline mode, the capability to use ansible-galaxy to retrieve modules and plugins and not only roles from different repositories ?

Is there a place to ask for a new feature (add an issue in the Github project) ?

Regards,
Nicolas
--
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/w24_hWH5NhA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7dwDWaTC3piRiyyrvWXPq%2Brm2r5DWgHD3knMJM_bOHx4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Brian Coca

unread,
Mar 8, 2016, 5:25:00 PM3/8/16
to ansible...@googlegroups.com
There is already a PR for offline mode, as for ansible-galaxy doing more than roles, that is a no for the foreseeable future, you can still use roles to encapsulate, share and use plugins though.

----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages