Cannot load yaml data coming from Ansible: Number of aliases for non-scalar nodes exceeds the specified max=50
Hello, I'm linking the issue https://github.com/rundeck/rundeck/issues/9278 here as it seems related to the Ansible-plugin.
Describe the bug
I'm not able to load my Ansible inventory in Rundeck because of the following error :
[2024-09-26T08:46:25,397] ERROR resources.ExceptionCatchingResourceModelSource [NodeService-SourceLoader1] - [ResourceModelSource: 2.source (com.batix.rundeck.plugins.AnsibleResourceModelSourceFactory), project: Security_updates] com.dtolabs.rundeck.core.resources.ResourceModelSourceException: Cannot load yaml data coming from Ansible: Number of aliases for non-scalar nodes exceeds the specified max=50
Possible root cause The amount of aliases for collections is set to 50 by default to avoid https://en.wikipedia.org/wiki/Billion_laughs_attack See https://javadoc.io/static/org.yaml/snakeyaml/1.32/org/yaml/snakeyaml/LoaderOptions.html#setMaxAliasesForCollections-int-
Possible solution I'm wondering if it would be possible to add a call to the setMaxAliasesForCollections function in ansible-plugin/src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java file in order to increase the default limit?
Thank you in advance
Thomas
Modifying the java code to set maxAliasesForCollections to an higher value (like 1000) seems to fix the problem. But I keep having java.lang.NullPointerException like in https://github.com/rundeck/rundeck/issues/9278#issuecomment-2363156231
i had to do the same in https://github.com/rundeck-plugins/ansible-plugin/pull/388
Hi @tpegeot Is it possible for you to share a version of your inventory that produces the issue? Thanks Luis
Hi @ltamaster,
Here is a version of our inventory that produces the issue : We still have the issue.
[abc-dep]
vm-dmc-rav-1.domain.local
[def]
vm-def-uuu-1.def.domain.local
vm-def-log-1.def.domain.local
vm-def-abc-1.def.domain.local
vm-def-apt-1.def.domain.local ansible_python_interpreter=/usr/bin/python3
vm-def-msg-1.def.domain.local ansible_python_interpreter=/usr/bin/python3
vm-ghi-www-1.domain.local
vm-jkl-www-1.domain.local
vm-mno-www-t2.def.domain.local
vm-mno-sql-t2.def.domain.local
vm-mno-www-2.def.domain.local
vm-mno-sql-2.def.domain.local
vm-pqr-prx-10.def.domain.local
vm-pqr-prx-11.def.domain.local
vm-stv-www-t1.def.domain.local
vm-stv-www-1.def.domain.local
vm-stv-sql-t1.def.domain.local
vm-stv-sql-1.def.domain.local
vm-ghy-www-t4.def.domain.local
vm-ghy-sql-t4.def.domain.local
vm-ghy-www-4.def.domain.local
vm-ghy-sql-4.def.domain.local
vm-ghy-var-t3.def.domain.local
vm-ghy-var-t4.def.domain.local
vm-ghy-var-3.def.domain.local
vm-ghy-var-4.def.domain.local
vm-def-bvb-1.def.domain.local
vm-def-bvb-2.def.domain.local
vm-def-who-1.def.domain.local
[deflight]
random.domain.local
vm-jkl-www-1.domain.local
#===========Serveurs Distrib===================
[distrib]
vm-upr-mgt-1.domain.local
vm-jkl-uhq-2.domain.local
vm-jks-kms-1.domain.local
vm-bvu-sup-1.domain.local
vm-bvu-his-1.domain.local
vm-bvu-app-t1.domain.local
vm-bvu-app-1.domain.local
vm-bvu-app-2.domain.local
#===================Serveurs PQR====================
[pqr-ela]
vm-pqr-ela-3.domain.local
vm-pqr-ela-4.domain.local
vm-pqr-ela-5.domain.local
vm-pqr-ela-6.domain.local
vm-pqr-ela-7.domain.local
vm-pqr-ela-8.domain.local
vm-pqr-ela-9.domain.local
vm-pqr-ela-10.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-11.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-12.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-13.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-14.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-15.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-16.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-17.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-18.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-19.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-20.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-mgt-1.domain.local
[pqr-kib]
vm-pqr-kib-1.domain.local
[pqr-tst]
# Log
[pqr-log]
vm-pqr-log-1.domain.local
vm-pqr-log-2.domain.local
vm-pqr-log-3.domain.local
vm-pqr-log-4.domain.local
vm-pqr-log-5.domain.local
vm-pqr-log-6.domain.local
vm-pqr-log-7.domain.local
vm-def-log-1.def.domain.local
vm-pqr-prx-1.domain.local
vm-pqr-prx-2.domain.local
vm-pqr-prx-3.domain.local
vm-pqr-prx-4.domain.local
vm-pqr-prx-10.def.domain.local
vm-pqr-prx-11.def.domain.local
vm-pqr-prx-11.def.domain.local
vm-def-who-1.def.domain.local
# Ing
[pqr-ing]
vm-pqr-ing-1.domain.local
vm-pqr-ing-2.domain.local
vm-pqr-ing-3.domain.local
#======================Default================================
[default]
vm-upr-mgt-1.domain.local
vm-jkl-www-1.domain.local
vm-jks-kms-1.domain.local
[interne]
vm-aze-abc-1.domain.local
vm-aze-app-t1.domain.local
vm-aze-app-1.domain.local
vm-dmc-rav-1.domain.local
vm-abc-prx-8.domain.local
vm-abc-prx-7.domain.local
vm-abc-prx-6.domain.local
vm-abc-prx-5.domain.local
vm-abc-prx-4.domain.local
vm-abc-prx-3.domain.local
vm-abc-prx-10.domain.local
vm-abc-prx-11.domain.local
other3.domain.local
other4.domain.local ansible_python_interpreter=/usr/bin/python2
vm-rty-app-2.domain.local
vm-uio-lin-1.domain.local
vm-htr-app-2.domain.local ansible_python_interpreter=/usr/bin/python3
vm-pqr-ela-3.domain.local
vm-pqr-ela-4.domain.local
vm-pqr-ela-5.domain.local
vm-pqr-ela-6.domain.local
vm-pqr-ela-7.domain.local
vm-pqr-ela-8.domain.local
vm-pqr-ela-9.domain.local
vm-pqr-ela-10.domain.local
vm-pqr-ela-11.domain.local
vm-pqr-ela-12.domain.local
vm-pqr-ela-13.domain.local
vm-pqr-ela-14.domain.local
vm-pqr-ela-15.domain.local
vm-pqr-ela-16.domain.local
vm-pqr-ela-17.domain.local
vm-pqr-ela-18.domain.local
vm-pqr-ela-19.domain.local
vm-pqr-ela-20.domain.local
vm-pqr-log-1.domain.local
vm-pqr-log-2.domain.local
vm-pqr-log-3.domain.local
vm-pqr-log-4.domain.local
vm-pqr-log-5.domain.local
vm-pqr-log-6.domain.local
vm-pqr-log-7.domain.local
vm-pqr-kib-1.domain.local
vm-pqr-mgt-1.domain.local
vm-uuu-app-1.domain.local
vm-uuu-app-2.domain.local
vm-fde-app-t2.domain.local ansible_python_interpreter=/usr/bin/python3 auditd_enabled=true
vm-fde-sql-t1.domain.local ansible_python_interpreter=/usr/bin/python3 auditd_enabled=true
vm-fde-app-1.domain.local ansible_python_interpreter=/usr/bin/python3 auditd_enabled=true
vm-fde-sql-1.domain.local ansible_python_interpreter=/usr/bin/python3 auditd_enabled=true
vm-qsd-cmd-1.domain.local ansible_python_interpreter=/usr/bin/python3
vm-klm-int-1.domain.local ansible_python_interpreter=/usr/bin/python3
vm-wxq-app-1.domain.local ansible_python_interpreter=/usr/bin/python3
vm-abc-app-1.domain.local ansible_python_interpreter=/usr/bin/python3
vm-abc-prx-1.domain.local ansible_python_interpreter=/usr/bin/python3
vm-qwa-app-1.domain.local ansible_python_interpreter=/usr/bin/python3
vm-fsa-log-1.domain.local
vm-hfc-app-1.domain.local
vm-upr-mgt-1.domain.local
vm-l2t-abc-1.domain.local
vm-gda-abc-1.domain.local
vm-abc-prx-2.domain.local
vm-abc-sql-1.domain.local
vm-jui-app-2.domain.local
vm-pqr-ing-1.domain.local
vm-dfg-ftp-1.domain.local
vm-nhu-app-1.domain.local ansible_python_interpreter=/usr/bin/python3
vm-jkl-uhq-2.domain.local
vm-gis-app-1.domain.local
vm-gis-app-2.domain.local
vm-klm-ins-1.domain.local
vm-wxq-app-1.domain.local
vm-gpi-app-2.domain.local
vm-qsd-mgt-6.domain.local
vm-pqr-prx-1.domain.local
vm-pqr-prx-2.domain.local
vm-pqr-prx-3.domain.local
vm-pqr-prx-4.domain.local
vm-pqr-ing-2.domain.local
vm-pqr-ing-3.domain.local
prod-bdd.other.lan
prod-bda.other.lan
prod-bdf.other.lan
maquette-bdf.other-maquette.lan
maquette-bdd.other-maquette.lan
vm-rst-gtw-1.domain.local
vm-uhe-app-2.domain.local ansible_python_interpreter=/usr/bin/python3
vm-uhe-app-t2.domain.local ansible_python_interpreter=/usr/bin/python3
vm-qsd-red-2.domain.local
vm-abc-cht-1.domain.local
vm-uhe-uhq-1.domain.local
vm-dfh-app-3.domain.local
vm-dfh-app-2.domain.local
vm-dfh-sql-1.domain.local
vm-uuu-app-3.domain.local
ghr001.tech.lan
ghr002.tech.lan
ghr003.tech.lan
ghr004.tech.lan
ghr005.tech.lan
ghr006.tech.lan
ghr007.tech.lan
ghr008.tech.lan
ghr009.tech.lan
ghr010.tech.lan
ghr011.tech.lan
ghr012.tech.lan
ghr013.tech.lan
ghr014.tech.lan
ghr015.tech.lan
ghr016.tech.lan
ghr017.tech.lan
ghr018.tech.lan
ghr019.tech.lan
ghr020.tech.lan
vm-bvb-log-1.domain.local
vm-bvb-log-2.domain.local
vm-3pa-wit-2.domain.local ansible_python_interpreter=/usr/bin/python3
vm-wap-app-1.domain.local
vm-yut-app-1.domain.local
vm-yut-app-2.domain.local
vm-uhq-dba-3.domain.local
vm-uhe-uhq-2.domain.local
vm-bvu-sup-1.domain.local
vm-bvu-his-1.domain.local
vm-bvu-app-t1.domain.local
vm-bvu-app-1.domain.local
vm-bvu-app-2.domain.local
vm-mdp-app-t1.domain.local
vm-abc-prx-9.domain.local
vm-dfh-app-3.domain.local
vm-dfh-sql-3.domain.local
vm-prx-srv-1.domain.local ansible_python_interpreter=/bin/python
vm-htr-app-1.domain.local
vm-jks-abc-1.domain.local
vm-jks-kms-1.domain.local
vm-ike-app-t1.domain.local
vm-ike-app-1.domain.local
vm-msg-prx-1.domain.local
vm-msg-prx-2.domain.local
[internelight]
vm-klm-app-t3.domain.local
vm-klm-app-t4.domain.local
vm-klm-app-3.domain.local
vm-klm-app-4.domain.local
vm-buh-app-t5.domain.local
vm-buh-app-t6.domain.local
vm-buh-app-t7.domain.local
[uuu]
vm-uuu-app-1.domain.local
vm-uuu-app-2.domain.local
vm-uuu-app-3.domain.local
vm-def-uuu-1.def.domain.local
[syslog]
other5.domain.local
vm-fsa-log-1.domain.local
[abc]
vm-abc-app-1.domain.local
vm-def-abc-1.def.domain.local
vm-abc-prx-1.domain.local
vm-abc-prx-3.domain.local
vm-abc-prx-4.domain.local
vm-abc-prx-5.domain.local
vm-abc-prx-6.domain.local
vm-abc-prx-7.domain.local
vm-abc-prx-8.domain.local
vm-abc-prx-9.domain.local
vm-abc-prx-10.domain.local
vm-abc-prx-11.domain.local
vm-jks-abc-1.domain.local
[mail_relay]
vm-def-msg-1.def.domain.local
vm-ghy-www-1.domain.local
vm-msg-prx-1.domain.local
vm-msg-prx-2.domain.local
[ssl_def]
vm-def-apt-1.def.domain.local
[apt]
vm-def-apt-1.def.domain.local
vm-uio-lin-1.domain.local
[fde-app]
vm-fde-app-t2.domain.local ansible_python_interpreter=/usr/bin/python3
vm-fde-app-1.domain.local ansible_python_interpreter=/usr/bin/python3
vm-qsd-cmd-1.domain.local ansible_python_interpreter=/usr/bin/python3
[fde-sql]
vm-fde-sql-t1.domain.local ansible_python_interpreter=/usr/bin/python3
vm-fde-sql-1.domain.local ansible_python_interpreter=/usr/bin/python3
[ghy]
vm-ghy-www-1.domain.local
[qsd-cmd]
vm-qsd-cmd-1.domain.local ansible_python_interpreter=/usr/bin/python3
[wxq]
vm-wxq-app-1.domain.local
[pom-fra]
ci-qsd-mgt-1.mgt.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-abc-1.it.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-dns-1.infra.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-wxq-1.it.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-vpn-1.vpn.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
#ci-stc-smb-1.stc.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-www-1.def.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-rpy-1.defext.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-pqr-ela-1.pqr.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-prx-1.app.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
[pom-updates-1]
ci-qsd-mgt-1.mgt.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-abc-1.it.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-dns-1.infra.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-vpn-1.vpn.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-www-1.def.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
[pom-updates-2]
#ci-stc-smb-1.stc.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-rpy-1.defext.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-pqr-ela-1.pqr.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-prx-1.app.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
ci-fra-wxq-1.it.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
[dnsmasq]
ci-fra-dns-1.infra.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
[nhuible]
vm-nhu-app-1.domain.local ansible_python_interpreter=/usr/bin/python3
[def-updates-test]
vm-ghy-var-t3.def.domain.local
vm-ghy-var-t4.def.domain.local
vm-mno-www-t2.def.domain.local
vm-mno-sql-t2.def.domain.local
vm-stv-www-t1.def.domain.local
vm-stv-sql-t1.def.domain.local
vm-ghy-www-t4.def.domain.local
vm-ghy-sql-t4.def.domain.local
[def-updates-prod-1]
vm-def-uuu-1.def.domain.local
vm-def-msg-1.def.domain.local ansible_python_interpreter=/usr/bin/python3
vm-ghy-sql-4.def.domain.local
vm-mno-sql-2.def.domain.local
vm-ghy-var-3.def.domain.local
vm-pqr-prx-10.def.domain.local
vm-stv-www-1.def.domain.local
vm-def-bvb-1.def.domain.local
[def-updates-prod-2]
vm-ghy-www-4.def.domain.local
vm-ghy-var-4.def.domain.local
vm-mno-www-2.def.domain.local
vm-def-log-1.def.domain.local
vm-stv-sql-1.def.domain.local
vm-pqr-prx-11.def.domain.local
vm-def-bvb-2.def.domain.local
vm-def-who-1.def.domain.local
[interne-updates-test]
vm-fde-sql-t1.domain.local
vm-fde-app-t2.domain.local
vm-qsd-cmd-1.domain.local
vm-ike-app-t1.domain.local
vm-aze-app-t1.domain.local
[interne-updates-prod-upr-1]
vm-jkl-uhq-2.domain.local
[interne-updates-prod-upr-2]
vm-upr-mgt-1.domain.local ansible_python_interpreter=/usr/bin/python
vm-3pa-wit-2.domain.local ansible_python_interpreter=/usr/bin/python3
vm-jks-kms-1.domain.local
[interne-updates-prod-1]
vm-gpi-app-2.domain.local
vm-rty-app-2.domain.local
vm-fde-app-1.domain.local
vm-fde-sql-1.domain.local
vm-fsa-log-1.domain.local
vm-wxq-app-1.domain.local
other3.domain.local
vm-uuu-app-1.domain.local
vm-hfc-app-1.domain.local
vm-klm-ins-1.domain.local
vm-qsd-mgt-6.domain.local
vm-dmc-rav-1.domain.local
vm-dfh-app-2.domain.local
vm-dfh-sql-1.domain.local
vm-gis-app-2.domain.local
vm-bvb-log-1.domain.local
vm-wap-app-1.domain.local
vm-yut-app-1.domain.local
vm-msg-prx-1.domain.local
vm-aze-app-1.domain.local
[interne-updates-prod-2]
vm-klm-int-1.domain.local
vm-dfg-ftp-1.domain.local
vm-uuu-app-2.domain.local
vm-uuu-app-3.domain.local
vm-gis-app-1.domain.local
vm-rst-gtw-1.domain.local
vm-abc-cht-1.domain.local
vm-qsd-red-2.domain.local
vm-bvb-log-2.domain.local
vm-yut-app-2.domain.local
vm-mdp-app-t1.domain.local
vm-dfh-app-3.domain.local
vm-dfh-sql-3.domain.local
vm-ike-app-1.domain.local
vm-msg-prx-2.domain.local
vm-aze-abc-1.domain.local
[interne-updates-prod-3]
other4.domain.local ansible_ssh_private_key_file=/root/.ssh/id_ecdsa ansible_python_interpreter=/usr/bin/python2
[pqr-rack-1]
vm-pqr-ela-3.domain.local
vm-pqr-ela-5.domain.local
vm-pqr-ela-7.domain.local
vm-pqr-ela-8.domain.local
[pqr-rack-1-2]
vm-pqr-ela-11.domain.local
vm-pqr-ela-13.domain.local
vm-pqr-ela-15.domain.local
vm-pqr-ela-17.domain.local
vm-pqr-ela-19.domain.local
[pqr-rack-2]
vm-pqr-ela-4.domain.local
vm-pqr-ela-6.domain.local
vm-pqr-ela-9.domain.local
vm-pqr-ela-10.domain.local
[pqr-rack-2-2]
vm-pqr-ela-12.domain.local
vm-pqr-ela-14.domain.local
vm-pqr-ela-16.domain.local
vm-pqr-ela-18.domain.local
vm-pqr-ela-20.domain.local
[pqr-other-1]
vm-pqr-kib-1.domain.local
vm-pqr-ing-1.domain.local
vm-pqr-log-2.domain.local
vm-pqr-log-5.domain.local
vm-pqr-prx-10.domain.local
[pqr-other-2]
vm-pqr-mgt-1.domain.local
vm-pqr-ing-2.domain.local
vm-pqr-log-3.domain.local
vm-pqr-log-4.domain.local
vm-pqr-prx-11.domain.local
[pqr-other-3]
vm-pqr-prx-3.domain.local
vm-pqr-prx-4.domain.local
vm-pqr-log-1.domain.local
vm-pqr-ing-3.domain.local
[pqr-other-4]
vm-pqr-log-6.domain.local
vm-pqr-log-7.domain.local
vm-pqr-prx-1.domain.local
vm-pqr-prx-2.domain.local
[abc-updates-prod-1]
vm-def-abc-1.def.domain.local
vm-abc-prx-1.domain.local
vm-l2t-abc-1.domain.local
vm-gda-abc-1.domain.local
vm-abc-prx-2.domain.local
vm-abc-prx-3.domain.local
vm-abc-prx-4.domain.local
vm-abc-prx-5.domain.local
vm-abc-prx-6.domain.local
vm-abc-prx-7.domain.local
vm-abc-prx-8.domain.local
vm-abc-prx-9.domain.local
vm-abc-prx-10.domain.local
vm-abc-prx-11.domain.local
vm-jks-abc-1.domain.local
[openvpn]
ci-fra-vpn-1.vpn.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
[windows]
vm-gsp-app-3.domain.local
[windows-zwy]
vm-zwy-cdp-1.domain.local
vm-zwy-cdp-2.domain.local
vm-zwy-cdp-3.domain.local
[rundeck]
vm-qwa-app-1.domain.local ansible_python_interpreter=/usr/bin/python3
[hfc]
vm-hfc-app-1.domain.local
[uhqcle]
vm-jkl-uhq-2.domain.local
vm-jui-app-2.domain.local
vm-klm-app-3.domain.local
vm-klm-app-4.domain.local
vm-klm-cce-1.domain.local
vm-klm-app-t3.domain.local
vm-klm-app-t4.domain.local
vm-uhe-uhq-1.domain.local
vm-jkl-uhq-2.domain.local
vm-uhq-dba-3.domain.local
vm-uhe-uhq-2.domain.local
vm-bvu-his-1.domain.local
vm-bvu-app-t1.domain.local
vm-bvu-app-1.domain.local
vm-bvu-app-2.domain.local
[htr]
vm-htr-app-2.domain.local ansible_python_interpreter=/usr/bin/python3
[www-backup]
ci-fra-www-1.def.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
[www-backup-rpy]
ci-fra-rpy-1.defext.domain.cloud ansible_ssh_private_key_file=/root/.ssh/id_rsa_pom
[klms]
vm-klm-app-3.domain.local
vm-klm-app-4.domain.local
vm-klm-app-t4.domain.local
vm-klm-app-t3.domain.local
[ghybuhs]
vm-buh-app-t5.domain.local
vm-buh-app-t6.domain.local
vm-buh-app-t7.domain.local
[abc-prx]
vm-l2t-abc-1.domain.local
vm-gda-abc-1.domain.local
vm-abc-prx-2.domain.local
vm-abc-prx-3.domain.local
vm-abc-prx-4.domain.local
vm-abc-prx-5.domain.local
vm-abc-prx-6.domain.local
vm-abc-prx-7.domain.local
vm-abc-prx-8.domain.local
vm-abc-prx-9.domain.local
vm-abc-prx-10.domain.local
vm-jks-abc-1.domain.local
[jkl-www]
vm-jkl-www-1.domain.local
[klm-ins]
vm-klm-ins-1.domain.local
[uhqcle]
prod-uhqcle.other.lan
192.168.242.1
[mno-www]
vm-mno-www-t2.def.domain.local
vm-mno-www-2.def.domain.local
[mno-sql]
vm-mno-sql-t2.def.domain.local
vm-mno-sql-2.def.domain.local
[gpi]
vm-gpi-app-2.domain.local
[uhe]
vm-uhe-app-2.domain.local
vm-uhe-app-t2.domain.local
[ufhrbfg]
vm-qsd-mgt-6.domain.local
vm-upr-mgt-1.domain.local
vm-jks-kms-1.domain.local
vm-stv-www-1.def.domain.local
vm-uhe-app-2.domain.local
vm-uhe-uhq-1.domain.local
vm-uuu-app-1.domain.local
vm-abc-prx-7.domain.local
#vm-dce-www-1.domain.local
vm-fde-app-t2.domain.local
vm-abc-app-1.domain.local
vm-gpi-app-2.domain.local
vm-pqr-ela-10.domain.local
vm-pqr-log-1.domain.local
vm-wxq-app-1.domain.local
vm-pqr-prx-1.domain.local
vm-fsa-log-1.domain.local
vm-uio-lin-1.domain.local
vm-klm-ins-1.domain.local
other3.domain.local
vm-fde-app-1.domain.local
vm-fde-sql-1.domain.local
vm-klm-int-1.domain.local
vm-klm-app-3.domain.local
vm-klm-app-4.domain.local
vm-klm-app-t3.domain.local
vm-klm-app-t4.domain.local
vm-buh-app-t5.domain.local
vm-buh-app-t6.domain.local
vm-buh-app-t7.domain.local
[bdd-updates-prod-1]
vm-jkl-uhq-2.domain.local ansible_python_interpreter=/usr/bin/python3
vm-uhe-uhq-2.domain.local ansible_python_interpreter=/usr/bin/python3
vm-uhq-dba-3.domain.local ansible_python_interpreter=/usr/bin/python3
[ghr-updates-1]
ghr001.tech.lan
ghr003.tech.lan
ghr005.tech.lan
ghr007.tech.lan
ghr009.tech.lan
ghr011.tech.lan
ghr013.tech.lan
ghr015.tech.lan
ghr017.tech.lan
[ghr-updates-2]
ghr002.tech.lan
ghr004.tech.lan
ghr006.tech.lan
ghr008.tech.lan
ghr010.tech.lan
ghr012.tech.lan
ghr014.tech.lan
ghr016.tech.lan
ghr018.tech.lan
[log-bvb]
vm-qsd-cmd-1.domain.local
vm-bvb-log-1.domain.local
vm-bvb-log-2.domain.local
vm-def-bvb-1.def.domain.local
vm-def-bvb-2.def.domain.local
[log-prx]
vm-qsd-cmd-1.domain.local
vm-pqr-prx-1.domain.local
vm-pqr-prx-2.domain.local
vm-pqr-prx-3.domain.local
vm-pqr-prx-4.domain.local
vm-pqr-prx-10.def.domain.local
vm-pqr-prx-11.def.domain.local
[jui-updates-prod]
vm-jui-app-2.domain.local
[bvu-his]
vm-bvu-his-1.domain.local
[bvu-app]
vm-bvu-app-t1.domain.local
vm-bvu-app-1.domain.local
vm-bvu-app-2.domain.local
[yut]
vm-yut-app-1.domain.local
vm-yut-app-2.domain.local
[dfh-sql]
vm-dfh-sql-3.domain.local
[dfh-app]
vm-dfh-app-3.domain.local
[pqr:children]
pqr-ela
pqr-log
pqr-kib
pqr-ing
pqr-tst
[fde:children]
fde-app
fde-sql
[pom:children]
pom-fra
[bvu:children]
bvu-his
bvu-app
Thanks, Lucas.
Hi @tpegeot Is it possible for you to share a version of your inventory that produces the issue? Thanks Luis
@ltamaster , ldimaur0 uploaded our inventory.
As mentioned earlier, setting maxAliasesForCollections to an higher value (like 1000) fixes the "Number of aliases for non-scalar nodes exceeds the specified max=50" problem.
However, we've not been able to fix the "null exception" error. We tried https://github.com/rundeck-plugins/ansible-plugin/pull/388 but it didn't help.
@tpegeot ,could you share where we need to modify this value please ?
In src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java, I modified the ansibleInventoryList function :
public void ansibleInventoryList(NodeSetImpl nodes, AnsibleRunner.AnsibleRunnerBuilder runnerBuilder) throws ResourceModelSourceException {
int codePointLimit = yamlDataSize * 1024 * 1024;
+ int maxAliasesForCollections = 1000;
LoaderOptions snakeOptions = new LoaderOptions();
snakeOptions.setCodePointLimit(codePointLimit);
+ snakeOptions.setMaxAliasesForCollections(maxAliasesForCollections);
Yaml yaml = new Yaml(new SafeConstructor(snakeOptions));