Introduction to Ansible Transcripts
Lecture: Using the start-at-task Argument
0:00 Let's see if those application dependency tasks worked.
0:17 Okay, it looks like we pointed at a directory
0:19 rather than core items dot text file.
0:22 Let's open up
0:27 Okay, so we have app directory
0:32 and we need to look in our project.
0:34 And this is what we're trying to install
0:36 the requirements.txt file.
0:40 And we put a dot, which is going to make pip3
0:43 look four setup.py, but we want...
0:49 A requirement.txt file.
0:54 So, we're going to want to try this again
0:56 but you're probably thinking
0:57 boy what a pain in the butt
0:58 to constantly have to rerun every single step
1:00 over and over again.
1:01 So, that's why I want to show you
1:06 that we can start at a certain task
1:08 in our Ansible playbook.
1:09 We just need to tell Ansible which task
1:12 we want to start from.
1:14 If we take a look at our file here
1:17 we know that everything before it was successful.
1:19 Let's start from use pip3 to install
1:21 application dependencies and see if we can get that working
1:24 based on our change.
1:26 The way that we do this is we pass in
1:28 the --start-at-task argument
1:32 and then we surround by quotes the name of the task
1:35 which I just copied, we paste this in
1:39 use pip3 to install application dependencies.
1:41 Now, we'll kick this off.
1:43 Still going to gather the facts
1:44 but it'll go right to that task.
1:52 And then it'll keep running everything after that.
1:54 So, it looks like we were able to install
1:56 our application dependencies 'cause we can see up here
1:59 successfully installed and we can move ahead
2:02 set up our WSGI server, and then put these pieces together
2:05 to see how it's all working.