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

add ability to filter filetree_read with find patterns/exclude #927

Closed
wants to merge 2 commits into from

Conversation

parrjd
Copy link

@parrjd parrjd commented Oct 12, 2024

What does this PR do?

Add's the ability to include only, or exclude items from the automation due to errors, or for testing. Vars can be passed in directly in the playbook or passed in via extra vars within the controller, to allow testing only some apps, or excluding files that are breaking runs.

How should this be tested?

Sample using vars.

---
- hosts: all
  connection: local
  gather_facts: false
  vars:
    controller_configuration_projects_async_retries: 60
    controller_configuration_projects_async_delay: 2
    controller_username: "{{ vault_controller_username | default(lookup('env', 'CONTROLLER_USERNAME')) }}"
    controller_password: "{{ vault_controller_password | default(lookup('env', 'CONTROLLER_PASSWORD')) }}"
    controller_hostname: "{{ vault_controller_hostname | default(lookup('env', 'CONTROLLER_HOST')) }}"
    controller_validate_certs: "{{ vault_controller_validate_certs | default(lookup('env', 'CONTROLLER_VERIFY_SSL')) }}"
    filetree_controller_regex: true
    filetree_contorller_exclude:
      - "*./broken-app/.*"
      -  "*.bad-cred.yml"

  roles:
    - {role: infra.controller_configuration.filetree_read }
    - {role: infra.controller_configuration.dispatch }
...

Exclude single file that is breaking a run

---
    filetree_contorller_exclude: bad-cred.yml

Test only new-app, and app-casc

---
    filetree_controller_regex: true
    filetree_contorller_include: 
      - "*./new-app/.*"
      - "*./app-casc/.*"

Is there a relevant Issue open for this?

resolves #[number]

Other Relevant info, PRs, etc

@djdanielsson
Copy link
Collaborator

we are trying to re-organize everything and release an updated combined collection to make the 2.5 experience better, part of this change is moving filetree roles along with a few others into a new repo https://github.com/redhat-cop/aap_configuration_extended. please recreate your PR in it's new repo.

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.

2 participants