diff --git a/.all-contributorsrc b/.all-contributorsrc index 9c86013..c53b86d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -16,7 +16,7 @@ "avatar_url": "https://avatars1.githubusercontent.com/u/4160387?v=4", "profile": "https://sbaerlocher.ch", "contributions": [ - "code", + "code", "ideas" ] } diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..26888c9 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +# Top-most EditorConfig file +root = true + +# Default settings for all files +[*] +charset = utf-8 # Set the character encoding to UTF-8 +end_of_line = lf # Use Line Feed for new lines +indent_size = 4 # Set the indent size to 4 spaces +indent_style = space # Use spaces for indentation +insert_final_newline = true # Ensure file ends with a newline +trim_trailing_whitespace = true # Remove any whitespace at the end of a line +[{Makefile,go.mod,go.sum,*.go,.gitmodules}] +indent_style = tab +indent_size = 4 + +[*.md] +indent_size = 4 +trim_trailing_whitespace = false + +eclint_indent_style = unset diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..e80be97 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer diff --git a/main.go b/main.go index 39888ff..89591aa 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,11 @@ func main() { Usage: "path to galaxy requirements", EnvVars: []string{"ANSIBLE_GALAXY_FILE", "INPUT_GALAXY_FILE", "PLUGIN_GALAXY_FILE"}, }, + &cli.StringFlag{ + Name: "galaxy-force", + Usage: "galaxy force", + EnvVars: []string{"ANSIBLE_GALAXY_FORCE", "INPUT_GALAXY_FORCE", "PLUGIN_GALAXY_FORCE"}, + }, &cli.StringSliceFlag{ Name: "inventory,i", Usage: "specify inventory host path", @@ -206,6 +211,7 @@ func run(c *cli.Context) error { playbook := &ansible.AnsiblePlaybook{ Config: ansible.Config{ GalaxyFile: c.String("galaxy-file"), + GalaxyForce c.Bool("galaxy-force"), Inventories: c.StringSlice("inventory"), Playbooks: c.StringSlice("playbook"), Limit: c.String("limit"),