We are getting following error which is not letting us to configure or paste the haproxy.cfg from template file. Do we need any specific modules to replace with variable as we have in our playbook below?
Error:
TASK [Copying config files] ********************************************************************************************************************************************
fatal: [172.31.22.4]: FAILED! => {“changed”: true, “exit_status”: 1, “failed”: true, “msg”: “failed to validate”, “stderr”: “[ALERT] 224/120802 (6071) : parsing [/root/.ansible/tmp/ansible-tmp-1502626081.81-189349085727202/source:29] : server nginx1 has neither service port nor check port nor tcp_check rule ‘connect’ with port information. Check has been disabled.\n[ALERT] 224/120802 (6071) : parsing [/root/.ansible/tmp/ansible-tmp-1502626081.81-189349085727202/source:30] : server nginx2 has neither service port nor check port nor tcp_check rule ‘connect’ with port information. Check has been disabled.\n[ALERT] 224/120802 (6071) : Error(s) found in configuration file : /root/.ansible/tmp/ansible-tmp-1502626081.81-189349085727202/source\n[ALERT] 224/120802 (6071) : Fatal errors found in configuration.\n”, “stderr_lines”: [“[ALERT] 224/120802 (6071) : parsing [/root/.ansible/tmp/ansible-tmp-1502626081.81-189349085727202/source:29] : server nginx1 has neither service port nor check port nor tcp_check rule ‘connect’ with port information. Check has been disabled.”, “[ALERT] 224/120802 (6071) : parsing [/root/.ansible/tmp/ansible-tmp-1502626081.81-189349085727202/source:30] : server nginx2 has neither service port nor check port nor tcp_check rule ‘connect’ with port information. Check has been disabled.”, “[ALERT] 224/120802 (6071) : Error(s) found in configuration file : /root/.ansible/tmp/ansible-tmp-1502626081.81-189349085727202/source”, “[ALERT] 224/120802 (6071) : Fatal errors found in configuration.”], “stdout”: “”, “stdout_lines”: }
to retry, use: --limit @/etc/ansible/roles/task/lb.retry