til icon indicating copy to clipboard operation
til copied to clipboard

Use the provisioner to configure instances with tags

Open xluffy opened this issue 3 years ago • 0 comments

Bình thường để test xem role có chạy đúng như ý hay không:

molecule test --destroy=never

Tuy nhiên có những role có nhiều tasks, chạy lại tất cả các task trước đó rất mất thời gian, nếu dùng ansible thì có thể chạy playbook theo tags ví dụ

ansible-playbook playbook/abc.yml -i inventories/prod/hosts -t foo -t bar

Với molecule

molecule converge -- -vvv --tags foo,bar

Tuy nhiên sau đó cần chạy, chủ yếu xài chạy lại cho lẹ

molecule idempotence
molecule verify

xluffy avatar Aug 30 '21 13:08 xluffy