Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save firemanxbr/9d45d75a1174cc27fd4e27c10d28ad99 to your computer and use it in GitHub Desktop.
Save firemanxbr/9d45d75a1174cc27fd4e27c10d28ad99 to your computer and use it in GitHub Desktop.
Test command and Ansible-lint
#
# Test Command
#
$ ansible-playbook -i "localhost," trigger-and-wait-for-product-build.yml -e git_repo="NEW_git_repo" -e git_branch="NEW_git_branch" -e payload_name="NEW_payload_name" -e images="NEW_image" -e product_name="NEW_product_name" -e product_name="rhproduct" -e jenkins_url="https://jenkins-rhproduct.192.168.42.242.nip.io" -e job_name="test" -e workspace="/home/firemanxbr" -vvv
#
# Ansible-lint
#
$ ansible-lint trigger-and-wait-for-product-build.yml
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:5
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:8
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:11
[ANSIBLE0011] All tasks should be named
trigger-and-wait-for-product-build.yml:12
Task/Handler: set_fact workspace={{ lookup('env','WORKSPACE') }} job_url={{ jenkins_url }}/job/{{ job_name }} __file__=trigger-and-wait-for-product-build.yml __line__=12
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:15
[ANSIBLE0006] curl used in place of get_url or uri module
trigger-and-wait-for-product-build.yml:16
Task/Handler: Get Next Build Number
[ANSIBLE0012] Commands should not change things if nothing needs doing
trigger-and-wait-for-product-build.yml:16
Task/Handler: Get Next Build Number
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:22
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:25
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:30
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:35
[ANSIBLE0012] Commands should not change things if nothing needs doing
trigger-and-wait-for-product-build.yml:36
Task/Handler: Getting the product Token
[ANSIBLE0013] Use shell only when shell functionality is required
trigger-and-wait-for-product-build.yml:36
Task/Handler: Getting the product Token
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:40
[ANSIBLE0006] curl used in place of get_url or uri module
trigger-and-wait-for-product-build.yml:41
Task/Handler: Trigger Build
[ANSIBLE0012] Commands should not change things if nothing needs doing
trigger-and-wait-for-product-build.yml:41
Task/Handler: Trigger Build
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:48
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:51
[ANSIBLE0006] curl used in place of get_url or uri module
trigger-and-wait-for-product-build.yml:52
Task/Handler: Wait for Build to Complete
[ANSIBLE0012] Commands should not change things if nothing needs doing
trigger-and-wait-for-product-build.yml:52
Task/Handler: Wait for Build to Complete
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:58
[ANSIBLE0002] Trailing whitespace
trigger-and-wait-for-product-build.yml:61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment