-
Notifications
You must be signed in to change notification settings - Fork 24
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
AnsibleRun Support in Composition/XR #172
Comments
FWIW, I'm also using
I'm using the image built from the main branch. |
Thanks @AshleyDumaine. That got it working for me!! Really appreciate the response. |
@ride808 @fahedouch Do you agree that If so, should this issue be formally re-opened to request removal of the restrictions described above? Or, should this issue remain closed and the following issues be opened instead?
|
@ron1 would you please create an issue ticket with these informations and then reclose this one. Thks |
@AshleyDumaine @fahedouch One last question. In Ashley's snippet above the var:
It seems I'm definitely misunderstanding something here and how a provider is configured to allow connections to your provisioned managed resources. Where should ./ssh_id be coming from? Please let me know if you'd like me to open this as a question/new issue. |
@ride808 I was using a Example (that puts the private key at
|
we also support inventory if this can help |
@AshleyDumaine @fahedouch How do you manage dependencies. In my composition, my ansiblerun resource executes against the ec2 instance I provisioned in the same composition with an inline inventory. But ansiblerun is created in parallel with the instance resource so I get Unreachable errors killing my playbook. After the instance goes to a running state I can delete the anislberun resource in my cluster and let it re-create and then the playbook executes and completes. I've been unsuccessful at using wait_for_connection in the playbook as it just hangs and never exits. Did you encounter this? Any tips? Also - the ansiblerun resource didn't seem to try again after the failed playbook (should it be?). The only way I could get the playbook to rerun was by killing the ansiblerun resource and letting crossplane re-create it. |
@ride808 I believe this issue is relevant: crossplane/crossplane#2072 Specifically for
|
Hmm. That didn't seem to do the trick either. I can see the options getting passed in to the ssh call:
But after 30 seconds the ansible-playbook and ansible-runner processes in the provider pod just stop and my playbook never finishes. Seems to be the provider prematurely killing the playbook. Could it be that this isn't yet in a release and is killing my ansible playbook too quickly? #177 |
@fahedouch It seens a new 0.4.1 release that contains all the fixes/improvements sitting on the main branch would be very welcome here. |
I am planning to release the |
@fahedouch @ron1 the main image containing #177 did fix my issue. Is there a way to set that timeout? I didn't see any docs with the pull request on how to configure the provider and can see my playbooks taking longer than the default 20m. |
@ron1 I'll try to create those two issues against the project today and will close this one when I do. |
to override the default timeout or other flags (e.g not sure if this Maybe we should add a FAQ to address these kind of questions!
thanks |
Any more info on the namespace requirement? Same as @ride808 and @AshleyDumaine, I'm unable to compose an AnsibleRun resource unless I patch in a namespace. Is this intentional? I don't recall having to explicitly set the namespace for other providers (like AWS and Terraform). |
I can confirm @AshleyDumaine observations that an
I really wonder how you figured the first one out. This is such a weird issue. If you don't follow the workaround, the error message is:
These workarounds only work in legacy p&t compositions. When trying composition functions, it will result in:
|
Still facing this issue when using cluster-scoped AnsibleRun within a pipeline composition after upgrading to newly released v0.6.0.
Errors:
Is this expected? Is there any known workaround for this? Thanks |
Is the CRD cluster- or namespace-scoped in you Kubernetes cluster? |
Hi @janwillies, I'm using the new cluster-scoped that was introduced on v0.6.0.
|
What happened?
I can create an AnsibleRun resource without issue and run an inline ansible playbook. However, I'm unable to add the same AnsibleRun resource as a part of a larger crossplane composition/XR. Should it be possible to use AnsibleRun within an XR?
How can we reproduce it?
Creating an AnsibleRun Resources like the following works without issue:
When adding the same resource to an XR like below, the other resources (EC2 and SecurityGroup) in the composition are created, but the ansiblerun resource is not created:
What environment did it happen in?
Crossplane version: 1.10.1
provider-ansible:v0.4.0
provider-aws:v0.33.0
kubectl version
): 1.21.1uname -a
): Linux X86_64The text was updated successfully, but these errors were encountered: