Introduction to Ansible Transcripts
Chapter: Configuring Servers
Lecture: Configuring Servers
0:00 We know how to write a basic playbook include variables, read from environment variables encrypt sensitive information, and use templates
0:08 in order to configure our services. But how do we take that initial knowledge and scale it up for a more typical but complicated situation.
0:14 For example, let's say we wanted to configure a web and database server, two separate servers. Say we've got two of them on DigitalOcean.
0:21 We need to create non-root groups, users for both of them you need to harden the server against malicious attacks.
0:28 It'd have to stand up and configure a webserver add certificates for https, make sure that that webserver stays up, so that if for some reason
0:36 the webserver process goes down that it restarts itself automatically. We need to install and configure a database
0:42 on one of the servers and check the database connection make sure the database is configured properly and there's a whole lot of other substeps
0:48 that we need to take to make sure that we'd setup these two servers properly. In this chapter we're going to take that initial knowledge
0:54 that we gained from building our first playbook and scale it up to do all these things. We'll have a common role that will allow us
1:00 to take some default servers and set them up properly and then one of the servers will handle the webserver
1:06 and the other role will configure a database. There'll be a significant amount of live coding in this chapter, so you'll want to bring up
1:13 the finished Chapter 6 code which you can find at bit.ly/intro-ansible-ch6. When you bring up this link, it will contain all the files
1:23 that we're going to create in this chapter. There's going to be a lot of hands-on coding throughout the entire chapter
1:28 but I promise you're going to be very comfortable with a good-sized playbook once we're finished.