I want to remove the directory using ansible -
i want use variable remove directory if true. (remove_test: false, remove not test directory)
vars: remove_test: true - name: "remove test directory" file: path=/test state=absent when: remove_test
basic test codes
--- - hosts: localhost tasks: - name: "remove test directory" vars: remove_test: true file: path=/test state=absent when: remove_test
and can set remove_test variable, transfer value outer
Comments
Post a Comment