2 hours 51 minutes
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.
So the learning objective for this video is to learn how to create an in line script and our vagrant machine.
Still, let's start with our demo.
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.
And as you can notice, most of the text is green, which means is commented out and not executed
in vagrant. So we're going to scroll down
and we see lined 63 through 68
which specifies provisioning in vagrant and the example that you is using a shell script.
So what we're going to do is we're going to uncommon went out line 66
and there were going to delete 60 67 3 69
and then we're going to change. Our in line from shell to vagrant
We're going to save that,
and then we're going to go to commander of which again is a Conso, a Windows consul to run.
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.
and press enter.
We're going to answer vagrant provision.
Okay, We made a mistake here. We're not running a show,
so let's see if we just use the in line.
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.
I know what we forgot to do.
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.
So we forgot to do that.
And what we're going to do now is
what we're going to do now is we're going to try vagrant
And as you can see, our text vagrant is fun has been
rendered on our command prompt in commander.
So to recap what we did we went inside the vagrant folder which again is the most important Fowler vagrant because it specifies the
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
this here is our in lines for it right here.
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
mission of vagrant up command to start our favorite machine.
And then we had an error because we forgot to add the echo inside of our in line script.
Then we executed the vagrant provisioned again and we was successful. As we can see, our text vagrant is fine.
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
for our vagrant machine.
I can't wait to see you in that video. Have a good day. Bye.
Introduction to IT & Cybersecurity
In this course, We will cover several cybersecurity career roles - Network Administrator, Incident Responder, ...
2 CEU/CPE Hours Available
Certificate of Completion Offered