Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Ansible runner improvements - Run meta playbook #165

Merged

Conversation

arbulu89
Copy link
Contributor

@arbulu89 arbulu89 commented Jul 23, 2021

Improvements on the Ansible runner component.

Major changes:

  • Now, rather than running one ansible playbook in a loop, the runner runs an initial metadata playbook, which will upload the metadata to ARA for later consumption
  • Some major changes in how the AnsibleRunner is used, to provide more flexibility, as we need customization in each of the ansible calls. The RunPlaybook function covers more use cases (like running without any inventory)
  • Add some UT to check the most important parts of the code

The playbook names might change after we have something established about the whole Ansible playbooks structure

@arbulu89 arbulu89 force-pushed the feature/ansible-runner-improvements branch from 304b93c to 81ec208 Compare July 28, 2021 06:47
a, err := NewAnsibleMetaRunner(cfg)

expectedMetaRunner := &AnsibleRunner{
Playbook: "../test/ansible_test/ansible/meta.yml",
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be better to try to declare constants on top of the file with the Ansible playbooks directories and file names to avoid repeating them several times. No big deal though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Improved in: 0b54d0c

Copy link
Contributor

@rtorrero rtorrero left a comment

Choose a reason for hiding this comment

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

Apart from the small comment; everything looks fine to me. Since it's just a matter of "style" (thus possibly opinionated), I'm approving anyway. Great job :-)!

@arbulu89 arbulu89 merged commit 4520d3f into trento-project:runner Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants