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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -