Hello,
I'm linking the issue rundeck/rundeck#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
Hello,
I'm linking the issue rundeck/rundeck#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=50Possible 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