Closed wesley-dean-flexion closed 5 years ago
👍
Wes
--
http://flexion.us/ WES DEAN Embedded Liaison T. +1 (315) 520 - 8981 E. wdean@flexion.us FLEXION - VALUE FORWARD 1500 West Main Street, Suite 500 Sun Prairie, WI 53590
On Sun, Aug 4, 2019 at 7:43 AM cytopia notifications@github.com wrote:
@cytopia approved this pull request.
Thanks for the contribution
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cytopia/docker-ansible-lint/pull/12?email_source=notifications&email_token=AKXW4A2UM6UWTFVLPQIV4R3QC26HNA5CNFSM4IG5JG7KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCAPWPXQ#pullrequestreview-270493662, or mute the thread https://github.com/notifications/unsubscribe-auth/AKXW4A5NYAJWPC4CAJ62K7DQC26HNANCNFSM4IG5JG7A .
--
Notice: The information contained in this message or any attached document is confidential and intended only for individuals to whom it is addressed. If you got this message in error, please inform me immediately using one of the methods above. In some cases, I may ask you to return the documents at my expense. In general, please simply destroy the information at once. Any unauthorized use, distribution, or copying of this information is prohibited.
I've added an example command for testing a single Ansible role. For example, suppose I have a role named 'myrole' which I want to test independently (e.g., the role has its own repository); I can then go to the role's root directory and run the example command to run
ansible-lint
on it.So, if the role lives at:
~/src/myrole/
then I would go to ~/src/myrole/ and run the sample command provided (included below for your reference):
This assumes one uses
ansible-galaxy init
to create the role's directory structure (i.e., 'tests/test.yml' needs to exist).I use this frequently (I've an alias to run the test) as I typically have one role per repository such that the code can more easily be re-used by multiple playbooks. As a result, there often isn't a playbook file (hence the use of tests/test.yml)... so... this.