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

Implement a test script #3

Open
lenormf opened this issue Aug 20, 2021 · 2 comments
Open

Implement a test script #3

lenormf opened this issue Aug 20, 2021 · 2 comments

Comments

@lenormf
Copy link
Member

lenormf commented Aug 20, 2021

Would it be appropriate to have a script spin a VM and use the playbook on it, for testing purposes? Currently using Docker for that purpose, but I'd like a “proper” test system.

@aimxhaisse
Copy link
Member

I'm not sure how hard it is with ansible, there are things like, certificates that need to run on the IP that points to it. My flow is usually:

  • do something for 1 user, see if it should be automated
  • add it to the playbooks/tasks
  • run it to ensure it's working for other users
  • be OK with the fact that, when we start from scratch, we'll have some nits left and right to fix

@lenormf
Copy link
Member Author

lenormf commented Aug 21, 2021

There are indeed a few things that will fail, such as SSL certificates or systemd stuff (when a stupid Docker container is used as a target).

I'd like to avoid blindingly committing playbook changes without making sure they result in seemingly reasonable modifications on the target (e.g. file creation), when I can't straight up formally confirm the changes are good.

Is there a way to tell ansible-galaxy to abort the current thread of tasks and proceed with the next one in relation with the parent playbook? The idea is to have a test.sh script in the repo that spins a new VM/container and makes Ansible run as many individual roles as possible without stopping on the first hurdle (such as declaring a new Let's Encrypt certificate).

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

No branches or pull requests

2 participants