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

Document the possibility of vars/main and defaults/main being directories #1320

Merged
merged 11 commits into from
May 9, 2024

Conversation

radvalach
Copy link
Contributor

This PR dresses the issue #79.
I added an explanation of how these files can be directories with an example. I also mentioned this possibility in relevant places.

@ansible-documentation-bot ansible-documentation-bot bot added the new_contributor This PR is the first contribution by a new community member. label Apr 24, 2024
@ansible-documentation-bot
Copy link
Contributor

Thanks for your Ansible docs contribution! We talk about Ansible documentation on matrix at #docs:ansible.im and on libera IRC at #ansible-docs if you ever want to join us and chat about the docs! We meet there on Tuesdays (see the Ansible calendar) and welcome additions to our weekly agenda items - scroll down to find the upcoming agenda and add a comment to put something new on that agenda.

@radvalach radvalach marked this pull request as draft April 24, 2024 12:51
@radvalach radvalach marked this pull request as ready for review April 24, 2024 13:05
@oraNod oraNod added backport-2.15 Automatically create a backport for the stable-2.15 branch backport-2.14 Automatically create a backport for the stable-2.14 branch backport-2.16 Automatically create a backport for the stable-2.16 branch MUNI tech writers backport-2.17 Automatically create a backport for the stable-2.17 branch labels Apr 24, 2024
@oraNod oraNod requested a review from bcoca April 24, 2024 17:10
@oraNod
Copy link
Contributor

oraNod commented Apr 24, 2024

@bcoca Would you mind lending your expertise on this one please?

@oraNod
Copy link
Contributor

oraNod commented Apr 30, 2024

@radvalach Hi, it looks like this branch has some conflicts. Can you fix them and push again? If you have questions or doubts about resolving conflicts, let us know.

Copy link
Contributor

@oraNod oraNod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me @radvalach I've some suggestions for grammar and style. For the accuracy of the details I'll rely on someone like @bcoca who knows this stuff much better.

docs/docsite/rst/playbook_guide/playbooks_reuse_roles.rst Outdated Show resolved Hide resolved
docs/docsite/rst/playbook_guide/playbooks_reuse_roles.rst Outdated Show resolved Hide resolved
docs/docsite/rst/playbook_guide/playbooks_reuse_roles.rst Outdated Show resolved Hide resolved
docs/docsite/rst/playbook_guide/playbooks_reuse_roles.rst Outdated Show resolved Hide resolved
docs/docsite/rst/playbook_guide/playbooks_reuse_roles.rst Outdated Show resolved Hide resolved
@radvalach radvalach requested a review from bcoca May 1, 2024 15:59
@oraNod oraNod requested a review from samccann May 2, 2024 10:02
Copy link
Contributor

@samccann samccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @radvalach! I read through and added a few thoughts, and in general I agree with bcoca - let's just reference the role structure in most places.

In general, I don't think we need to clarify main.yml vs main.yaml in most places because that's quite common. And the 'main' option is now complicated because within the vars dir etc, it can actually have any name.

Copy link
Contributor

@samccann samccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I can't merge this because of unrelated CI problems, but will as soon as we clear those up. Thanks again for the PR!

@samccann samccann merged commit 34bf3a4 into ansible:devel May 9, 2024
8 checks passed
Copy link

patchback bot commented May 9, 2024

Backport to stable-2.15: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 34bf3a4 on top of patchback/backports/stable-2.15/34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb/pr-1320

Backporting merged PR #1320 into devel

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible/ansible-documentation.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-2.15/34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb/pr-1320 upstream/stable-2.15
  4. Now, cherry-pick PR Document the possibility of vars/main and defaults/main being directories #1320 contents into that branch:
    $ git cherry-pick -x 34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb
    If it'll yell at you with something like fatal: Commit 34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Document the possibility of vars/main and defaults/main being directories #1320 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-2.15/34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb/pr-1320
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link

patchback bot commented May 9, 2024

Backport to stable-2.14: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 34bf3a4 on top of patchback/backports/stable-2.14/34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb/pr-1320

Backporting merged PR #1320 into devel

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible/ansible-documentation.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-2.14/34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb/pr-1320 upstream/stable-2.14
  4. Now, cherry-pick PR Document the possibility of vars/main and defaults/main being directories #1320 contents into that branch:
    $ git cherry-pick -x 34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb
    If it'll yell at you with something like fatal: Commit 34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Document the possibility of vars/main and defaults/main being directories #1320 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-2.14/34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb/pr-1320
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@samccann
Copy link
Contributor

samccann commented May 9, 2024

Thank @radvalach for the Ansible docs fix!

Copy link

patchback bot commented May 9, 2024

Backport to stable-2.16: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2.16/34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb/pr-1320

Backported as #1443

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request May 9, 2024
…ries (#1320)

* feat: document the possibility of vars/main and defaults/main being directories

* fix: add backslashes before "*" symbols to override their special meaning

* fix: implement review feedback

* fix: change documented possible main file extensions

* fix: update feature to accommodate for recently merged documentation of custom main files

* fix: move defaults/vars main directories explanation

* fix: grammar and style changes

* fix: replace "lexicographical" with "alphabetical"

* fix: clarify the possibility of specifying custom file name

* fix: replace spelling out options with ref to an explanation

* fix: fix typo

---------

Co-authored-by: Radim Valach <radim.valach@favorlogic.com>
(cherry picked from commit 34bf3a4)
Copy link

patchback bot commented May 9, 2024

Backport to stable-2.17: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2.17/34bf3a4fc521568b3faf65b9926c54c3b5a8a7cb/pr-1320

Backported as #1444

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request May 9, 2024
…ries (#1320)

* feat: document the possibility of vars/main and defaults/main being directories

* fix: add backslashes before "*" symbols to override their special meaning

* fix: implement review feedback

* fix: change documented possible main file extensions

* fix: update feature to accommodate for recently merged documentation of custom main files

* fix: move defaults/vars main directories explanation

* fix: grammar and style changes

* fix: replace "lexicographical" with "alphabetical"

* fix: clarify the possibility of specifying custom file name

* fix: replace spelling out options with ref to an explanation

* fix: fix typo

---------

Co-authored-by: Radim Valach <radim.valach@favorlogic.com>
(cherry picked from commit 34bf3a4)
samccann pushed a commit that referenced this pull request May 9, 2024
…ries (#1320) (#1443)

* feat: document the possibility of vars/main and defaults/main being directories

* fix: add backslashes before "*" symbols to override their special meaning

* fix: implement review feedback

* fix: change documented possible main file extensions

* fix: update feature to accommodate for recently merged documentation of custom main files

* fix: move defaults/vars main directories explanation

* fix: grammar and style changes

* fix: replace "lexicographical" with "alphabetical"

* fix: clarify the possibility of specifying custom file name

* fix: replace spelling out options with ref to an explanation

* fix: fix typo

---------

Co-authored-by: Radim Valach <radim.valach@favorlogic.com>
(cherry picked from commit 34bf3a4)

Co-authored-by: radvalach <134097304+radvalach@users.noreply.github.com>
samccann pushed a commit that referenced this pull request May 9, 2024
…ries (#1320) (#1444)

* feat: document the possibility of vars/main and defaults/main being directories

* fix: add backslashes before "*" symbols to override their special meaning

* fix: implement review feedback

* fix: change documented possible main file extensions

* fix: update feature to accommodate for recently merged documentation of custom main files

* fix: move defaults/vars main directories explanation

* fix: grammar and style changes

* fix: replace "lexicographical" with "alphabetical"

* fix: clarify the possibility of specifying custom file name

* fix: replace spelling out options with ref to an explanation

* fix: fix typo

---------

Co-authored-by: Radim Valach <radim.valach@favorlogic.com>
(cherry picked from commit 34bf3a4)

Co-authored-by: radvalach <134097304+radvalach@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2.14 Automatically create a backport for the stable-2.14 branch backport-2.15 Automatically create a backport for the stable-2.15 branch backport-2.16 Automatically create a backport for the stable-2.16 branch backport-2.17 Automatically create a backport for the stable-2.17 branch MUNI tech writers new_contributor This PR is the first contribution by a new community member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants