Skip to content

Conversation

@tpdownes
Copy link
Contributor

@tpdownes tpdownes commented Jun 2, 2022

A common pattern in Ansible is to supply the --extra-vars argument or other arguments to ansible-playbook. See, for example, our own invocation in integration tests.

We do not presently support this in Runners. This PR adds that support. It will be useful for use cases such as rendering a Terraform value into an Ansible variable:

  role_example = {
    "type"        = "ansible-local"
    "content"     = file("${path.module}/files/example_role.yml")
    "destination" = "example_role.yml"
    "args"        = "-e \"password_id=${google_secret_manager_secret.pool_password.secret_id}\""
  }

Submission Checklist

  • Have you installed and run this change against pre-commit? (pre-commit install)
  • Are all tests passing? (make tests)
  • Have you written unit tests to cover this change?
  • Is unit test coverage still above 80%?
  • Have you updated all applicable documentation?
  • Have you followed the guidelines in our Contributing document?

@tpdownes
Copy link
Contributor Author

tpdownes commented Jun 2, 2022

Note that all build checks have passed.

@tpdownes tpdownes merged commit 770ad2d into GoogleCloudPlatform:develop Jun 2, 2022
@tpdownes tpdownes deleted the feat_ansible_args branch June 2, 2022 14:30
@tpdownes tpdownes mentioned this pull request Jun 8, 2022
6 tasks
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.

3 participants