Giter Club home page Giter Club logo

Comments (7)

ansibot avatar ansibot commented on July 20, 2024

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the component bot command.

from ansible.

s-hertel avatar s-hertel commented on July 20, 2024

While include_role and import_role do accept paths, anything else like ansible-galaxy list, ansible-doc -t role is not going to recognize roles within roles, so I think it would be better to put them all in the normal roles path. Subroles is not an ansible concept.

That said,

collections/
└── ansible_collections
    └── ns
        └── col
            └── roles
                └── common
                    ├── role_a
                    ├── role_b
                    └── tasks
                        └── main.yml

could be used in a play like this:

- hosts: all
  roles:
    - ns.col.common
    - ns.col.common.role_a

If you are trying to use collections, you'll need to update ansible to a more recent version for that to work.

The only difference for standalone roles, you'd replace . with / for role subdirs, e.g. common/role_a.

from ansible.

ElieObadia avatar ElieObadia commented on July 20, 2024

Okay I understand but we used to do so and it worked previously to give you more context maybe that will help you to find the issue source

This is my structure
ansible_collections
└── system
├──galaxy.yml
└── roles
├── roles1
└── roles2

Each role as a task.yml file inside and this is my galaxy.yml file :

namespace: i252
name: system 
version: 2.0.0

Do you know why is not working?

from ansible.

ElieObadia avatar ElieObadia commented on July 20, 2024

Okay I understand but we used to do so and it worked previously to give you more context maybe that will help you to find the issue source

This is my structure
ansible_collections
└── system
├──galaxy.yml
└── roles
├── roles1
└── roles2

Each role as a task.yml file inside and this is my galaxy.yml file :

namespace: i252
name: system
version: 2.0.0
Do you know why is not working?

from ansible.

ElieObadia avatar ElieObadia commented on July 20, 2024

Okay I understand but we used to do so and it worked previously to give you more context maybe that will help you to find the issue source

This is my structure
ansible_collections
└── system
├──galaxy.yml
└── roles
├── roles1
└── roles2

Each role as a task.yml file inside and this is my galaxy.yml file :

namespace: i252
name: system
version: 2.0.0
Do you know why is not working?

from ansible.

ElieObadia avatar ElieObadia commented on July 20, 2024

Can you check the comment below for more informations.

from ansible.

s-hertel avatar s-hertel commented on July 20, 2024

@ElieObadia From the information given, I think this behavior should not have changed, and you can achieve what you want through available features. I can take another look if you can share a play and filestructure (verbatim, please) that reproduces the problem and used to work. If I can reproduce the issue then I can bisect which commit introduced the change in behavior.

from ansible.

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.