-
Notifications
You must be signed in to change notification settings - Fork 16
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
Using --check on first-run fails hard #69
Comments
Hello @patrickjahns, Sorry for the delayed response. I've tried running this locally, and I don't get this error.
What linux distribution and version of this role are you running with? Are you still seeing this error? |
I take that back. I reworked my test environment, and can replicate an error on the same task. I don't get the full output though. Will look into this more. |
So the error I encountered is a little different, @patrickjahns. In a clean environment, if I run just the role with
It appears that when running in check mode, because ansible doesn't execute anything, if a dependent artifact (like the apt cache being updated to include the So I'll need to know a bit more about your environment, @patrickjahns, before I can go much further, since I wasn't able to exactly replicate your issue.
|
Thank you for looking into the issue - I have moved on from the project where the error occured It was a Ubuntu 18.04 system. In order to trigger the error, the system need to be "fresh" i.e. never having threatstack agent installed. There are two ways forward:
|
Being somewhat new to Ansible, it seemed to me that I could mark certain tasks to ignore errors in checkmode, but that still outputs errors, just doesn't fail, so I don't see how that would help your use case. |
Going to close this for now. Please feel free to re-open. |
Immutability is IMHO a different concept which translates to the fact, that you are not mutating the state of your infrastructure and instead you are replacing the infrastructure. In terms of virtual machines this means, that you build a Image (i.e. Amazon AMI, cloud-image, iso etc.) and run this - whenever you need to perform a change, you built a new image and spin of the virtual machine with that image. Similar to containers based concepts. As written upsteam:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_checkmode.html I've seen Why is this important? |
I see. I'm not sure I see a way to have
-- OR --
...but it seems like I'd have to do that to a lot of tasks, rendering
I'm still unclear on what this means in this context. |
Description
When using the role and running it with a
--check
in the first run, it fails with:Expectation
I want to able to run the role in
--check
mode first in order to see the changes, before I will apply them. I expect no failure to occureThe text was updated successfully, but these errors were encountered: