Skip to content

Commit

Permalink
Increased max file size allowed in snake yaml from 3mb to 10mb
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Abarca committed Jul 8, 2024
1 parent 2dff53e commit c5b50bf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,11 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx
* @throws ResourceModelSourceException
*/
public void ansibleInventoryList(NodeSetImpl nodes, AnsibleRunner.AnsibleRunnerBuilder runnerBuilder) throws ResourceModelSourceException {
Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));

LoaderOptions snakeOptions = new LoaderOptions();
// max inventory file size allowed to 10mb
snakeOptions.setCodePointLimit(10_485_760);
Yaml yaml = new Yaml(new SafeConstructor(snakeOptions));

String listResp = getNodesFromInventory(runnerBuilder);

Expand Down

0 comments on commit c5b50bf

Please sign in to comment.