--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKRLcHhW59QN_ek7%2BZegO2af7ChoM9dxpA_sLbx1-Lxy%3DEghQA%40mail.gmail.com.
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7dCxr%2BEWrqv-ZeQVELa6M7J6ZamBwZxTkOFdcKrP2-RdA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKRLcHh_iZibHBzqUyyYp4zWv%2BDM%3DWr6yz0gQWOiO2HuhMWx0w%40mail.gmail.com.
[private message; off-list]
Ashok,
I don't know how much more plainly I can say this.
Post (copy and paste) the relevant tasks.
Post the job log. Run it with two "v"s — ansible-playbook -vv …
There are billions of ways things can fail. Do you expect us to know why yours failed when you've provided nothing more than the assertion that it didn't do what you thought it would?
Give us the job log and the playbook, and we will try to help you. Without those, we'd be wasting our time and yours with baseless guessing.
--
Todd
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKRLcHh%3DoGubi%3DtJZB6KMD9wtwo_Ntz2WhJKvuCuMrqoPLTxAw%40mail.gmail.com.
-- Todd
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKRLcHh%3DoGubi%3DtJZB6KMD9wtwo_Ntz2WhJKvuCuMrqoPLTxAw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2B8iFp68YnTUj%2BT0wO%3DmOToz_rnTHnpRri3m7yGgfyc6zD0huQ%40mail.gmail.com.
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7cYP9FYFNLNUdioZWdVzfe_fUcwjhAXNobiE04fmz%3DKUQ%40mail.gmail.com.
Hi Brian,Did not configure the ignore_errors in playbook
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF8BbLZc4d-45fOrGRkxsJWz64jA_sKFu_Kp34OiY2KZCzVFYQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2b84e66e-b502-4012-a1c6-af5048289bcbn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAPAjob_Q57kPtf4QAjM3iQUT8QUom9sqscnUAVTtq-kJQu8_tg%40mail.gmail.com.
Hi John,
I have configured the meta_play: end_play in roles where the task has failed but it will not exit .Can you please guide me?
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF8BbLZqC9bkNdukmr73TskmVp2PRVhjUUc0iU_Z-%3DUtv2yqLQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKRLcHhreiz%2Bm7Xurp3K2YysYOyVvBCOnKtbw6rO%3DT%3Dibphjdg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAPAjob_MA5fcn7qifCMZWLFTwq2LRE%2B%2BcRNxE8Ni4c_RPhxYsw%40mail.gmail.com.
any_errors_fatal
and a task returns an error, Ansible finishes the fatal task on all
hosts in the current batch, then stops executing the play on all hosts.
Subsequent tasks and plays are not executed. You can recover from fatal
errors by adding a rescue section to the block. You can set any_errors_fatal
at the play or block level.- hosts: somehosts any_errors_fatal: true roles: - myrole - hosts: somehosts tasks: - block: - include_tasks: mytasks.yml any_errors_fatal: true
You can use this feature when all tasks must be 100% successful to continue playbook execution. For example, if you run a service on machines in multiple data centers with load balancers to pass traffic from users to the service, you want all load balancers to be disabled before you stop the service for maintenance. To ensure that any failure in the task that disables the load balancers will stop all other tasks:
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKRLcHgV8rs8HS5JPVb5PhZkgDkCO9iM%3DzNF8gQX0PaXpSpPPg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2B8iFp5WVFeDat6efBxVnn8e1TZnBHF13mp_v%3DjGE5vYDFPvuA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKRLcHiRH5R78pMVCqY%3Drvqes829ExKmpqRcKXCOMzsE_j5zPw%40mail.gmail.com.
Hi all,
Please find below;
Jenkins configuration:
("${environment}" == "uat") {
ansiblePlaybook(
playbook: 'deploy.yml',
inventory: 'hosts',
tags: 'downtime',
extraVars: [
app_env: 'uat',
jfrog_username:
jfrog_password:
branch: "${branch}",
maintanance: 'no',
build_version: version
deploy.yml:
- hosts: "{{ app_env }}"
gather_facts: no
remote_user: ansible
become: true
serial: 1
tasks:
- block:
- include_tasks: main.yml
any_errors_fatal: true
vars_prompt:
- name: "jfrog_username"
prompt: "Enter JFrog username"
private: no
- name: "jfrog_password"
prompt: "Enter JFrog password"
private: yes
tags: [ downtime, nodowntime ]
- hosts: "{{ app_env }}"
gather_facts: no
remote_user: ansible
become: true
serial: 1
ignore_errors: no
any_errors_fatal: true
roles:
- deploy
vars_prompt:
- name: "jfrog_username"
prompt: "Enter JFrog username"
private: no
- name: "jfrog_password"
prompt: "Enter JFrog password"
private: yes
tags: [ downtime, nodowntime ]
Jenkins Logs:
ansible-playbook deploy.yml -i hosts -t downtime -e app_env=uat -e jfrog_username= -e jfrog_password= -e branch=uat -e maintanance=no -e build_version=558
10:44:18 ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
10:44:18
10:44:18 The error appears to have been in '/var/jenkins_home/workspace/SG-MyInfo-Deployment/deploy.yml': line 28, column 11, but may
10:44:18 be elsewhere in the file depending on the exact syntax problem.
10:44:18
10:44:18 The offending line appears to be:
10:44:18
10:44:18 - block:
10:44:18 - include_tasks: main.yml
10:44:18 ^ here
TASK [deploy : Check if multiple files exist and fail playbook if any file does not exist] ***
14:50:07 fatal: [10.119.39.101]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'item' is undefined\n\nThe error appears to have been in '/var/jenkins_home/workspace/SG-MyInfo-Deployment/deploy/tasks/main.yml': line 8, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Check if multiple files exist and fail playbook if any file does not exist\n ^ here\n"}
14:50:07 ...ignoring
14:50:07 ERROR! invalid meta action requested: end_host
14:50:07
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2B8iFp4qCHF-BzcCJ4%2BkOCULorvbs0sSuq0ydxiiqV1YXyDBmQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKRLcHhNbZHHHE11M%3DG2cWTMg7gbPr6FOViJNzfCcB0DVwm5TA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF8BbLY%3Dsd_XNhMhxVRyywATur5vWG1zGTSWmDzr89K8N-fAxA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKRLcHgWWKEwQrW52bX3se%3DyAyaM7L69a8DD3A6rTmUVGAPqBQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF8BbLYnK5u6uudms3khHpfcsXLD4Jjnu%3DM0rHgdX%3D7iNdaxRg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2B8iFp5WVFeDat6efBxVnn8e1TZnBHF13mp_v%3DjGE5vYDFPvuA%40mail.gmail.com.
I tried without using serial=1 but can’t make it to work
On Wed, 20 Sep 2023 at 5:06 PM, Ashok Reddy <ashok...@gmail.com> wrote:
Hi David,
I tried using block level but it throws error
ansible-config dump --only-changedwould tell us, but you still have not shared that with us. Please post the output from that command.
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/700e6e27-6cf0-cd1f-fd64-7eeeb67bce64%40gmail.com.