Ansible And Wget


Answer :

Don't use shell-module when there is specialized modules available. In your case:

Create directories with file-module:

- name: create project directory {{ common.project_dir }}   file: state=directory path={{ common.project_dir }} 

Download files with get_url-module:

- name: download sources   get_url: url={{ opencv.url }} dest={{ common.project_dir }}/{{ opencv.file }} 

Note the new module call syntax in the examples above.

If you have to use sudo with password remember to give --ask-sudo-pass when needed (see e.g. Remote Connection Information).


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?