Skip to content

Instantly share code, notes, and snippets.

@rcbop
Created June 4, 2018 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcbop/74905380db0b8112413fbee4bf4c4bb5 to your computer and use it in GitHub Desktop.
Save rcbop/74905380db0b8112413fbee4bf4c4bb5 to your computer and use it in GitHub Desktop.
bruteforce become ansible module, use as BECOME METHOD
#!/bin/bash
cmd=''
for i in "$@"; do
i="${i//\\/\\\\}"
cmd="$cmd \"${i//\"/\\\"}\""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment