Introduction to Ansible Transcripts
Chapter: Configuring Servers
Lecture: Our New Inventory File
0:00 With these two servers ready to go
0:02 now we can create our inventory file.
0:03 Copy the IP address of the web server
0:06 go back over to the command line.
0:09 Create the hosts file, this in the base
0:10 directory of the project.
0:12 We're going to have four roles here.
0:13 The first one will be init_config.
0:15 This will just be for getting our deployer
0:17 and deployers groups set up.
0:19 Then we'll have a common role for any
0:21 tasks that we want to execute on every server.
0:24 Our web server. And database.
0:27 For each one of these, we need to specify an IP address.
0:29 The first one is 18.104.22.168.
0:34 And since we're using Ubuntu 18.04
0:36 we want to specify the ansible_python_interpreter
0:39 so it's explicitly going to be Python 3.
0:46 And then we have our second server.
0:54 Now we can copy these down into common.
0:56 And then 128 is our web server
0:58 and 59 is our database server.
1:01 Now we're all set with our inventory file
1:02 and we can get started writing our roles for this playbook.