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

[Enabler] [AC] Add support to run playbooks in any managed venv #1787

Open
1 task done
ddimatos opened this issue Nov 4, 2024 · 0 comments
Open
1 task done

[Enabler] [AC] Add support to run playbooks in any managed venv #1787

ddimatos opened this issue Nov 4, 2024 · 0 comments
Assignees
Labels
Backlog Enabler Enabler task

Comments

@ddimatos
Copy link
Collaborator

ddimatos commented Nov 4, 2024

Is there an existing issue for this?

  • There are no existing issues.

Enabler description

Since the team ends up running playbooks to recreate client issues, it would be helpful of ac supported this given it has the venv's already running. I started a rough draft of the interface below and thought I would place it here for later use.

# ------------------------------------------------------------------------------
# Run ansible-playbook for any named venv
# ------------------------------------------------------------------------------
#->playbook:
## Run ansible-playbook for any named venv.
## Usage: ac --playbook --file <str>  [--host <str>] [--user <bool>]
##     file:
##     host (optional):
##          - Space or comma delimited managed nodes to use.
##          - Entering one more managed nodes overrries the auto detection feature which
##            will build a cluster of managed nodes to run on.
##          - Only the host prefix is needed, e.g. 'ec01150a'
##     user (optional):
##          - Ansible user authorized to run tests on the managed node.
##     python (requred):
##          - IBM enterprise python version, e.g 3.10', '3.11', '3.12'
##     zoau (optional):
##          - ZOAU version to use. e.g. 1.2.5, 1.3.0, 1.3.1
##     pythonpath (optional):
##          - The absolute path to where the ZOAU python module is located.
##          - The can be for the precopiled binary, wheels or setup tools installation home.
##          - Default is to use the precompiled binary (until we establish wheel locations)
## Example:
##  $ ac --playbook --file "/path/playbook.yml" (this will look for inventory file in location of playbook)
##  $ ac --playbook --file "/path/playbook.yml" --inventory "/path/inventory"
##  $ ac --playbook --file "/path/playbook.yml" --inventory "/path/inventory" --user ibmuser
##  $ ac --playbook --file "/path/playbook.yml" --host "ibm.com" --user "ibmuser"
ac_playbook(){
    message "Running ansible playbook...."
    . $VENV_BIN/activate && $VENV_BIN/ansible-playbook --.....
}

Ansible module

No response

@ddimatos ddimatos added the Enabler Enabler task label Nov 4, 2024
@ddimatos ddimatos added the Needs Triage Issue need assessment by a team member(s) label Nov 4, 2024
@ddimatos ddimatos added this to the [Backlog] Enablers milestone Nov 4, 2024
@richp405 richp405 added Backlog and removed Needs Triage Issue need assessment by a team member(s) labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog Enabler Enabler task
Projects
Status: Backlog
Development

No branches or pull requests

3 participants