til
til copied to clipboard
Use the provisioner to configure instances with tags
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