summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/roles (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add end_role meta task (#83263)Martin Krizek2024-08-1310-0/+100
| | | ci_complete
* Typo fixes and other bits and bobs (#83672)Lee Garrett2024-07-271-1/+1
| | | Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
* import_role - allow subdirectories with _from options (#82642)Sloane Hertel2024-02-064-7/+30
| | | | | | | | | | | | | | | | | | | * Allow subdirectories with import_role _from options Add tests that tasks_from is restricted to the role Note that a task like: - import_role: name: role tasks_from: tasks/entrypoint.yml will now load tasks from "{{ role_path }}/tasks/tasks/entrypoint.yml" instead of "{{ role_path }}/tasks/entrypoint.yml". This change in behavior matches include_role. * better test case (filename doesn't match one in tasks/) Fixes #82584
* Role fixes (#82339)Brian Coca2023-12-224-0/+90
| | | | | | | | | | * Various fixes to roles - static property is now properly set - role_names and other magic vars now have full list - role public/private var loading is now done when adding to play.roles instead of on each var query - added tests Co-authored-by: Felix Fontein <felix@fontein.de>
* remove args passthru on role runme tests that use grep (#82060)Matt Davis2023-10-231-13/+13
| | | * varying verbosity was masking some first-pass test failures
* Import role public (#81772)Brian Coca2023-10-021-2/+25
| | | | | | | | revert to previous behavior to push vars to play at compile time add `public` parameter to allow per import control of exporting (vs just the global config) Co-authored-by: tchernomax <maxime.deroucy@gmail.com> Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* Only mark a role as complete once a task in it executes for the target host ↵Sloane Hertel2023-09-086-0/+62
| | | | | | | (#81565) * If all tasks in the role are skipped or unreachable, the role is not marked as complete for the host. * Only mark the role as complete if a task in the role succeeds or fails for the host.
* Always create new role (#78661)Matt Martz2022-11-295-0/+26
| | | | Don't use role cache for determining whether to create a new instance of role
* compile role with all parents in the dep chain (#79079)Sloane Hertel2022-10-1213-0/+35
| | | | | fix inheriting from parents when role depth exceeds 3 Fixes #47023
* avoid roles exporting vars: (#69040)Brian Coca2022-09-288-0/+392
| | | | | | | | | | | | | | | | - correct 'vars:' precedence to allow phasing out of include_params - actually merge vars and always include role_vars - avoided dupe deps from giving wrong vars - use 'first' instance of dep as others are from previous instances/invocations and can have diff values for vars - ensured deps only provide exportable vars themselves - added COMMENTS - added tests - apply export restrictions setting to defaults - use 'public' as cutoff Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com> ci_complete
* Re-organize CI test groups for POSIX tests. (#77420)Matt Clay2022-08-041-1/+1
| | | | | | * `context/target` tests must be in groups 1 - 2. * `context/controller` tests must be in groups 3 - 5. This makes it easier to efficiently organize groups and balance test runtimes.
* Restrict role loading .. to role ... (#77683)Brian Coca2022-05-173-0/+17
| | | * Ansible will now error out if you try to use the `*_from` to load files from outside the role being loaded by `{import,include}_role`
* Revert "Compile role with parents in the task's dependency chain (#75165)" ↵Sloane Hertel2021-09-2413-44/+0
| | | | | (#75779) This reverts commit 440cf15aeb134e7df3969d4481dbe027358d74db.
* Compile role with parents in the task's dependency chain (#75165)Sloane Hertel2021-09-2213-0/+44
| | | | | | | | | * Use the task dependency chain to compile the role instead of the parent role's _parents list * keep existing role inheritance, but limit it to roles in the current task dependency chain * Test getting role parents recursively by using the current task dependency chain * changelog
* ansible-test - split controller/target testing (#75605)Matt Clay2021-09-211-0/+1
|
* Add a test for deduplicating dependencies with include_role (#75259)Sloane Hertel2021-07-152-1/+12
|
* only add data when there is data to add (#54559)Brian Coca2021-02-115-0/+14
| | | | | | | | | | Only add data when there is data to add also avoid clobbering existing data with empty file fixes #45843 * remove redundant code, update comments * fix mock dataloader, original does not return None * added test
* Add support for argument_specs attribute to RoleMetadata class (#73120)David Shrewsbury2021-01-071-0/+2
|
* Prevent duplicate role insertion into roles: (#50552)Brian Coca2019-01-169-0/+59
* Corner case in which import_role would add another instance of a role with the same signature into roles: when it already existed there. roles: - name: a tasks: - import_role: name=a would execute role 'a' 3 times instead of the intended 2 (x2 in roles: phase +1 in tasks:) * added tests