ansible-lint
ansible-lint copied to clipboard
selecting profiles on the command-line requires "="
Summary
Selecting profiles on the command-line doesn't work with "-P profile", only with "-P=profile".
This doesn't work:
ansible-lint -P basic test.yml
ansible-lint: error: argument -P/--profile: invalid choice: 'test.yml' (choose from 'min', 'basic', 'moderate', 'safety', 'shared', 'production')
This works:
ansible-lint -P=basic test.yml
Ansible and Ansible Lint details
ansible-lint 6.4.1.dev5 using ansible 2.13.2
I am not sure if this can be fixed as it is cause by argparse getting confused, especially as we do allow no arguments for -P, which is the command for listing profiles.
I used "-P profile" because that's what the examples in the documentation looked like. Just changing the documentation might be the easiest.