[ansible-project] Re: How to pass params from Ansible to Jenkins Job triggered by Ansible Playbook?
Using the Example Curl -X you can use the Ansible URI Module curl -X POST http://developer:developer@localhost:8080/job/test/buildWithParameter --data-urlencode json='{"parameter": [{"name":"paramA", "value":"123"}]}'--- - name: Jenkins Remote Build hosts: localhost connection: local tasks: - name: Adding Virtual Machine to Blackout uri: url: http://developer:developer@localhost:8080/job/test/buildWithParameter method: POST body_format: JSON body: "{\"parameter\": [{\"name\":\"Test\"}, {\"vaule\":\"123\"}]}status_code: 200 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/493bd37e-c52c-49e2-8280-9353b423023d%40googlegroups.com.
[ansible-project] Re: How to pass params from Ansible to Jenkins Job triggered by Ansible Playbook?
it is not clear how to make the params as input there, it is easy to make it through Jenkins pipelines, but I am using Ansible, so I am expecting to have a Jenkins module that will build a job in Jenkins (or in my case handle the params to already existing job in Jenkins On Thursday, May 7, 2020 at 10:02:20 PM UTC+2, David Foley wrote: > > Hi, > > In order to push jobs from Ansible or even Python to Jenkins you need to > make sure Remote Trigger is enable and an API Token has been created for > your Jenkins User. You can Then just use a Post request using the Ansible > URI module > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/928edc51-e64c-4961-9a67-5acb8b31497a%40googlegroups.com.
[ansible-project] Re: How to pass params from Ansible to Jenkins Job triggered by Ansible Playbook?
so I aam expecting to have a jenkins module that will have a params that will be passed to the already existing Jenkins Job and it will triggerit On Thursday, May 7, 2020 at 10:02:20 PM UTC+2, David Foley wrote: > > Hi, > > In order to push jobs from Ansible or even Python to Jenkins you need to > make sure Remote Trigger is enable and an API Token has been created for > your Jenkins User. You can Then just use a Post request using the Ansible > URI module > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b6f57e11-bcb2-4c2c-ab66-3b12b98b94a7%40googlegroups.com.
[ansible-project] Re: How to pass params from Ansible to Jenkins Job triggered by Ansible Playbook?
it is not clear how to make the params as input there, it is easy to make it through Jenkins pipelines, but I am using Ansible, so I am expecting to have a Jenkins module that will build a job in Jenkins (or in my case handle the params to already existing job in Jenkins) On Thursday, May 7, 2020 at 10:02:20 PM UTC+2, David Foley wrote: > > Hi, > > In order to push jobs from Ansible or even Python to Jenkins you need to > make sure Remote Trigger is enable and an API Token has been created for > your Jenkins User. You can Then just use a Post request using the Ansible > URI module > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a7a4c599-10d1-4fe5-a8af-8eecf0eb64a4%40googlegroups.com.