Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New dir layout #49

Merged
merged 2 commits into from Oct 22, 2015
Merged

New dir layout #49

merged 2 commits into from Oct 22, 2015

Conversation

rndmh3ro
Copy link
Member

This change gets rid of the separate role dir and puts everything into the root-directory, making it possible to install the role via ansible galaxy.

Sebastian Gumprich added 2 commits October 21, 2015 20:52
This change gets rid of the separate role dir
and puts everything into the root-directory, making
it possible to install the role via ansible galaxy.
@rndmh3ro rndmh3ro mentioned this pull request Oct 21, 2015
ypid added a commit to ypid/ypid-ansible-common that referenced this pull request Oct 21, 2015
@conorsch
Copy link
Contributor

This is a good change, and should be more intuitive for those just starting to use the role. However, this change doesn't add the ability to install via ansible-galaxy, it simply shortens the include path necessary for playbooks. For example, instead of this:

- name: Lock down OS settings.
  hosts: all:&{{ hosts }}
  sudo: yes
  roles:
    - role: hardening.os-hardening/roles/ansible-os-hardening

you can do this:

- name: Lock down OS settings.
  hosts: all:&{{ hosts }}
  sudo: yes
  roles:
    - role: hardening.os-hardening

Having a roles subdirectory makes sense if there are multiple, related roles bundled together—but that's not the case here, since hardening.ssh-hardening is managed in a separate repo.

@ypid
Copy link
Member

ypid commented Oct 21, 2015

  • role: hardening.os-hardening/roles/ansible-os-hardening

Sure you can do this if you really want to …

I am more role oriented. I like to have all roles in Ansible’s roles_path and just use them in my playbooks directly.

@conorsch
Copy link
Contributor

@ypid The hardening.os-hardening/roles/ansible-os-hardening path does use the roles_path. If you run ansible-galaxy install hardening.os-hardening, the role will be immediately available for inclusion via the verbose path. With the proposed changes, we could all use the terser hardening.os-hardening, which is a benefit, but galaxy support exists already with the current directory layout.

@ypid
Copy link
Member

ypid commented Oct 21, 2015

@conorsch Sure.

@chris-rock
Copy link
Member

@rndmh3ro Great simplification @conorsch could you please open an separate issue or PR for your needs?

chris-rock added a commit that referenced this pull request Oct 22, 2015
@chris-rock chris-rock merged commit 652474b into master Oct 22, 2015
@chris-rock chris-rock deleted the new_dir_layout branch October 22, 2015 09:50
rndmh3ro pushed a commit that referenced this pull request Jul 24, 2020
rndmh3ro pushed a commit that referenced this pull request Nov 8, 2020
Fix linting errors and simplivy vars-handling
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this pull request Aug 3, 2022
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this pull request Aug 3, 2022
Fix linting errors and simplivy vars-handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants