Giter Site home page Giter Site logo

Ansible 2.0 not supported about ansigenome HOT 25 OPEN

nickjj avatar nickjj commented on June 15, 2024
Ansible 2.0 not supported

from ansigenome.

Comments (25)

drybjed avatar drybjed commented on June 15, 2024 3

@nathanhruby Hi! Right off the bat the biggest benefit would be to change the default ansigenome metadata file. Right now ansigenome expects the ansigenome_info dict in the meta/main.yml of the Ansible role, however Ansible does not tolerate it at all. In my roles, I moved that dictionary to separate meta/ansigenome.yml file which is not an issue for Ansible.

There should be some changes in the default template that interprets the dictionary data. Ansible Galaxy recently switched from role ids to user/role naming scheme in the Galaxy URLs. Since role id is not easy to find anymore (maybe through API), I would siwtch the ansigenome_info.galaxy_id variable to just ansigenome_info.galaxy bool activating or diactivating the custom template parts, and used the user/role information from separate variable. I'm not sure if Ansible Galaxy uses GitHub user/repository mapping or GitHub user/Galaxy role name, I suppose that could be tested.

One other thing that I would change is removal of role categories and switch to Ansible Galaxy tags.

from ansigenome.

ypid avatar ypid commented on June 15, 2024

Hi @larsla
Me and I think also @nickjj would appreciate your help here. This issue is related to #23 and @nickjj somehow closed it. The trick which is already used is to move the ansigenome_info to meta/ansigenome.yml for Ansible 2.0 but Ansigenome can not handle that right now. To fix this, the script would need to be changed so that it tries to read the metadata from meta/ansigenome.yml first. I tired that once but gave up because if the code quallity. @nickjj agrees that the script could need some rework. If you want to help, that would be awesome πŸ‘

from ansigenome.

nathanhruby avatar nathanhruby commented on June 15, 2024

@nickjj is there a specific type of fix you're looking for here? If so, can you let me know? I'd be happy spend some time this weekend on this issue so I can start my 2.0 upgrade work next week.

from ansigenome.

nickjj avatar nickjj commented on June 15, 2024

Hey @drybjed, would you mind guiding @nathanhruby on what would need to be done to upgrade Ansigenome to be 2.0 compatible?

I haven't used Ansible in quite some time and I'm not sure of any of the changes.

from ansigenome.

ypid avatar ypid commented on June 15, 2024

@larsla, @nathanhruby any progress?

from ansigenome.

nathanhruby avatar nathanhruby commented on June 15, 2024

sorry I got pulled away from the 2.0 upgrade, of which this was a blocker. I haven't had time to get back to it. I will try to carve out some time this week.

from ansigenome.

mihai-satmarean avatar mihai-satmarean commented on June 15, 2024

Hello everybody, this topic remains unattended even that in the forks there are a lot of changes in this direction. It would be really helpful if you can somehow integrate usage for Ansible > 2.0
Thanks!

from ansigenome.

ypid avatar ypid commented on June 15, 2024

#49 fixes this or at least has a workaround for it. Feel free to cherry pick.

from ansigenome.

mihai-satmarean avatar mihai-satmarean commented on June 15, 2024

from ansigenome.

ypid avatar ypid commented on June 15, 2024

@mihai-satmarean I mean that https://github.com/ypid/ansigenome already includes a workaround. It might need some rework but then it can be proposed in a separate PR to fix this issue.

from ansigenome.

mihai-satmarean avatar mihai-satmarean commented on June 15, 2024

Since we would like to automate our documentation with this tool, but we have no bandwidth to address this would be great if someone can point us to a working branch/fork that just works with ansible >2.0.
Thank you!

from ansigenome.

ypid avatar ypid commented on June 15, 2024

As said, https://github.com/ypid/ansigenome/tree/devel includes a patch. It just works with Ansible 2.0 and above (but should be reworked to be merged into Ansigenome).

from ansigenome.

adriaand007 avatar adriaand007 commented on June 15, 2024

hi there maybe I'm missing something but I get the following error
File "build/bdist.linux-x86_64/egg/ansigenome/scan.py", line 83, in init
File "build/bdist.linux-x86_64/egg/ansigenome/scan.py", line 183, in scan_roles
File "build/bdist.linux-x86_64/egg/ansigenome/scan.py", line 410, in read_and_validate_meta
KeyError: 'keyids_file'

This is if I run the command like

ansigenome gendoc /etc/ansible/roles/ -f md

from ansigenome.

ypid avatar ypid commented on June 15, 2024

@adriaand007 Thanks for reporting! Fixed. The idea is that the keyids_file is provided in Ansigenome configuration (example: https://github.com/debops/debops-keyring/blob/master/keyids)

keyids_file: /home/user/.ansible/ypid-ansible-common/submodules/debops-keyring/keyids

I made it optional. You can try with the latest commit from my fork.

from ansigenome.

mihai-satmarean avatar mihai-satmarean commented on June 15, 2024

ypid, Thanks for the reply, I had cloned the repo instead of the other ansigenome I had installed, and init a role. After that trying to scan, gendoc or anything would reply
No roles were found at this path:
Also what I understand is that meta/main.yml became more restrictive and that is why ansigenome creates it's own file now.
This looks like a very useful project,
Can anyone help by pointing to a working version with Ansible 2.3? Maybe even a new branch?
Thank you very much!

from ansigenome.

ypid avatar ypid commented on June 15, 2024

Hi @mihai-satmarean

As said, https://github.com/ypid/ansigenome/tree/devel includes a patch.

from ansigenome.

mihai-satmarean avatar mihai-satmarean commented on June 15, 2024

Hi @ypid I had used that repo to generate a new role, and meta/ansigenome.yml is not created, the result of the command "ansigenome scan " against a role created by asnigenome results in
`ansigenome gendoc -l ansigenome_test


Traceback (most recent call last):
  File "/usr/local/bin/ansigenome", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Volumes/diskE/Users/msn3/Documents/ansible-workspace/used_for_components/ansigenome/bin/ansigenome", line 326, in <module>
    main()
  File "/Volumes/diskE/Users/msn3/Documents/ansible-workspace/used_for_components/ansigenome/bin/ansigenome", line 322, in main
    fn(args, options, reloaded_config, parser)
  File "/Volumes/diskE/Users/msn3/Documents/ansible-workspace/used_for_components/ansigenome/bin/ansigenome", line 161, in execute_gendoc
    Scan(args, options, config, gendoc=True)
  File "/Volumes/diskE/Users/msn3/Documents/ansible-workspace/used_for_components/ansigenome/ansigenome/scan.py", line 83, in __init__
    self.scan_roles()
  File "/Volumes/diskE/Users/msn3/Documents/ansible-workspace/used_for_components/ansigenome/ansigenome/scan.py", line 183, in scan_roles
    if self.read_and_validate_meta(key):
  File "/Volumes/diskE/Users/msn3/Documents/ansible-workspace/used_for_components/ansigenome/ansigenome/scan.py", line 410, in read_and_validate_meta
    keyring_entities = self._get_debops_keyring_entities(self.config["keyids_file"])
KeyError: 'keyids_file'

from ansigenome.

ypid avatar ypid commented on June 15, 2024

Hm, Windows is unsupported I guess ;-) But I will look at it. Just the python stacktrace without linebreaks makes me nervous. Can you update the comment and use multiline code formating :) ? Although I think I spotted the issue. There was an issue a few comments above which I fixed #33 (comment). Your stacktrace suggests that you don’t have the fix yet. Please run git pull and confirm that ypid@39d7b1f is included.

https://help.github.com/articles/creating-and-highlighting-code-blocks/

from ansigenome.

mihai-satmarean avatar mihai-satmarean commented on June 15, 2024

Actually I am running it in a mac
I had run
/Library/Python/2.7/site-packages# sudo git clone https://github.com/ypid/ansigenome.git

from ansigenome.

ypid avatar ypid commented on June 15, 2024

@mihai-satmarean Ah, mac right. Sorry for that :)

Did the fresh git clone fix it?

from ansigenome.

mihai-satmarean avatar mihai-satmarean commented on June 15, 2024

from ansigenome.

ypid avatar ypid commented on June 15, 2024

nope.

There is still an issue with your setup. Line 410 in scan.py does not match up: https://github.com/ypid/ansigenome/blob/39d7b1fd2e4385d689efc1d364b0d30ff460e4da/ansigenome/scan.py#L410
Maybe you forgot pip install or something.

from ansigenome.

mihai-satmarean avatar mihai-satmarean commented on June 15, 2024

call me names, I forgot to run setup
it works now.
Need to learn how to use it properly

from ansigenome.

Hashfyre avatar Hashfyre commented on June 15, 2024

Hey folks, any update on this issue. The repo docs didn't say ansible2.0+ isn't supported. Is anyone working on this as of now?

from ansigenome.

ypid avatar ypid commented on June 15, 2024

Nobody is working on it as far as I know. Feel free to help.

from ansigenome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.