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

refactor Ansible files #51

Merged
merged 3 commits into from Mar 13, 2024
Merged

refactor Ansible files #51

merged 3 commits into from Mar 13, 2024

Conversation

hvanz
Copy link
Member

@hvanz hvanz commented Mar 11, 2024

The goal of this PR is to simplify the scripts by adopting some of Ansible best practices. In particular:

  • put many common settings in ansible.cfg,
  • organize files in a predefined directory layout, so we can reuse common variables and tasks. Common tasks are now in files under ansible/tasks and common variables, in ansibles/group_vars/all.yaml, which by defaults is included in all playbooks.

@@ -1,26 +1,12 @@
- name: update testapp
hosts: validators,loadrunners,ephemeral
Copy link
Member Author

Choose a reason for hiding this comment

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

The only relevant task in this playbook for loadrunners is tasks/testapp-clone-repo.yaml, which is already included loader-init.yaml.

@hvanz hvanz marked this pull request as ready for review March 12, 2024 20:48
@hvanz hvanz requested a review from a team March 12, 2024 20:48
@greg-szabo
Copy link
Contributor

greg-szabo commented Mar 12, 2024

We should also disable gathering facts in playbooks that don't use it.

Copy link
Contributor

@greg-szabo greg-szabo left a comment

Choose a reason for hiding this comment

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

The ultimate solution would be to minimize the need for ansible. Unfortunately, this is not completely possible as we need to ship files to/from the hosts.

I'd love to see a remote docker-compose solution to manage the hosts services, instead of systems services. Maybe on a deep-flow week we can play with that.

@hvanz
Copy link
Member Author

hvanz commented Mar 13, 2024

I agree @greg-szabo. I did this refactoring while trying to understand the scripts. In the long run I hope this simplification of the code will help us to move away from this repo.

@hvanz hvanz merged commit dd60682 into main Mar 13, 2024
@hvanz hvanz deleted the hvanz/refactor-ansible branch March 13, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants