Time
2 hours 51 minutes
Difficulty
Beginner
CEU/CPE
3

Video Transcription

00:00
Hello. My name is Jasmine Jackson. And in this video I will show you a demo on how to create an in line script in vagrant. So let's go.
00:11
So the learning objective for this video is to learn how to create an in line script and our vagrant machine.
00:19
Still, let's start with our demo.
00:21
Okay? We're back in our vagrant foul. Remember, The vagrant file is the most important foul in vagrant as it specifies the configuration of your vagrant machine.
00:33
And as you can notice, most of the text is green, which means is commented out and not executed
00:41
in vagrant. So we're going to scroll down
00:46
and we see lined 63 through 68
00:51
which specifies provisioning in vagrant and the example that you is using a shell script.
00:59
So what we're going to do is we're going to uncommon went out line 66
01:07
67
01:11
68 69
01:15
and there were going to delete 60 67 3 69
01:23
and then we're going to change. Our in line from shell to vagrant
01:33
is fine.
01:38
We're going to save that,
01:48
and then we're going to go to commander of which again is a Conso, a Windows consul to run.
01:56
We're gonna go to Commander, which is Conso on Windows that allows you to execute linens Command. And we're going to enter the command vagrant.
02:07
Uh,
02:08
and press enter.
02:55
We're going to answer vagrant provision.
03:08
Okay, We made a mistake here. We're not running a show,
03:14
so let's see if we just use the in line.
03:21
So we're going to go, As you can see here, we had an error because Vagrant was looking for a show and we don't have one. So then let's run vache fragrant provision.
03:36
I know what we forgot to do.
03:38
When using an aniline script, we have to use the Echo command. And what the echo Command does is everything after the Echo command will print to the screen.
03:52
So we forgot to do that.
03:54
And what we're going to do now is
04:00
what we're going to do now is we're going to try vagrant
04:06
provision again.
04:17
And as you can see, our text vagrant is fun has been
04:25
rendered on our command prompt in commander.
04:28
So to recap what we did we went inside the vagrant folder which again is the most important Fowler vagrant because it specifies the
04:40
configuration of your vagrant machine. We went to lie 66 3 69 and we deleted 67 through 69. And then we changed our in life script to echo Vagrant is fun. So
04:57
this here is our in lines for it right here.
05:00
So we echoed which again will echo to the screen Vague vagrant Istvan. So this is our airline scripts. So from there we went to vagrant and we executed our vagrant up
05:18
mission of vagrant up command to start our favorite machine.
05:24
And then we had an error because we forgot to add the echo inside of our in line script.
05:30
Then we executed the vagrant provisioned again and we was successful. As we can see, our text vagrant is fine.
05:40
So let's go back to our lecture Still in summary in this video I showed you a quick demo on how to create an in line script in our vagrant machine. So in our next video, I will provide a demo on how to create an external script
05:59
for our vagrant machine.
06:00
I can't wait to see you in that video. Have a good day. Bye.

Up Next

Introduction to Vagrant

In this introductory Vagrant training, students will learn Vagrant’s core concepts, how to configure the virtualization tool, and how it will benefit their organizations. Upon completion of the course, students will have a foundational understanding of Vagrant.

Instructed By

Instructor Profile Image
Jasmine Jackson
Application Security Engineer
Instructor