in Education by
I am new at using Ansible. I tried to create directories and download files using Ansible. Should I use shell commands for the same or any other special module is available? Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
The following syntax can be used to create a directory called ABC in the path /src using file-module. - name:ABC (Creates directory) file: path: /src/www state: directory or, - name: create project directory {{ common.proj_dir }} file: state=directory path={{ common.proj_dir }} Now, to download a file using get_url-module, use the syntax given below: - name: download files get_url: url={{ opencv.url }} dest={{ common.proj_dir }}/{{ opencv.file }}

Related questions

0 votes
    I'm just getting my feet wet with Ansible 2.2 and Devops and I've run into the following problem. I have a ... . How to fix this? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    My git workspace is dirty, there are some local modifications. When I use the command git pull origin master it ... Ansible git module? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    If I have to build an infrastructure stack in the cloud using a tool like Ansible. Is it necessary to have the ... the best to use? Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
0 votes
    I have a playbook that looks like the following. It is supposed to install python onto the remote machine ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    Can you please tell me the difference between kubectl apply and kubectl create. Why there are 3 different commands ... the same thing? Select the correct answer from above options...
asked Jan 23, 2022 in Education by JackTerrance
0 votes
    I tried this: pip3 install --user --upgrade awscli pip3 --version I'm getting: pip 9.0.1 from /downloads/ ... not found. Please help. Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I want to expose multiple ports to the machine’s interface. How to achieve this using a docker container? Please help. Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    Could someone tell me whether as a non-IT engineer could I shift my career to DevOps? Select the correct answer from above options...
asked Jan 6, 2022 in Education by JackTerrance
0 votes
    Could someone tell me how to start a DevOps career? Select the correct answer from above options...
asked Jan 6, 2022 in Education by JackTerrance
0 votes
    In Jenkins, is there a way to restrict the user to view only certain jobs? Only through "Project-based ... allows job restriction? Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
0 votes
    How to rename the AWS Lambda function which I had created for testing purpose? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I am unable to find the containers under the directory: /var/lib/docker/containers Can you please tell me the ... the host machine? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    Hello I am trying to upload some files to the amazon S3 bucket but I am facing an error that the key is ... 't exist Please help. Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    I have created a docker image. I want to push it into my docker repo but I am facing this error: denied: ... to the resource is denied Select the correct answer from above options...
asked Jan 21, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me what are DevOps tools? Select the correct answer from above options...
asked Jan 9, 2022 in Education by JackTerrance
...