Introduction to Ansible Transcripts
Chapter: What's Next
Lecture: Course Recap
0:00 We've covered a lot of ground together
0:01 over the past few hours.
0:02 Now that you know how to configure servers
0:04 and deploy applications with Ansible
0:06 you've got a strong foundation to be able to do
0:08 almost anything you want with the tool.
0:10 Let's recap a little bit where we've been.
0:11 We talked about why Ansible is such a great tool
0:13 for configuration management
0:15 how it's made configuration management much easier
0:17 than alternative tools that came before it.
0:19 We worked through the initial concepts
0:20 like modules, tasks, roles, playbooks
0:23 and the inventory files as the core pieces
0:25 that we needed to know about to use Ansible.
0:27 As we started our first playbook and expanded upon it
0:29 we learned to write our playbooks and then run them
0:31 against the server and perform useful tasks
0:34 like creating deployer users
0:35 instead of logging in as a root
0:36 so that we could perform any step that we wanted to take
0:38 on a remote server.
0:39 Most of our playbooks consist of YAML
0:41 and we wrote a bunch of it together.
0:42 Got our top-level playbook.yml file
0:45 and then the individual tasks combined together under roles
0:48 like common, or web server, or database server.
0:50 As we got comfortable with writing simple playbooks
0:52 like this, we learned about working with data
0:54 adding variables, reading environment variables
0:56 using templates as our input data
0:58 and encrypting data as well.
0:59 We added a group_vars file and learned how to encrypt it
1:02 and we learned how to use templates to configure services
1:05 such as Nginx.
1:06 We combined the variables with the templates
1:08 executed by tasks and Ansible to create our configuration
1:11 on remote servers.
1:12 Encrypting files consist of using Ansible Vault
1:15 the encrypt and decrypt command
1:16 and passing in the vault password
1:18 whenever we run our playbook
1:19 that contains sensitive information
1:21 so that Vault could decrypt the data before it is run
1:24 and then re-encrypt it once the playbook is over
1:25 so that the information stays secret.
1:27 With all of our concepts in place, we work through building
1:30 a good size Ansible playbook to configure multiple servers.
1:33 We had a bunch of common operations we wanted to apply
1:36 to all servers in our common role.
1:38 Then, we separated out
1:39 the web server and database server roles
1:42 to differentiate our server types.
1:43 You can try to extend this model with your own caching
1:46 load balancing, and other server roles
1:48 when necessary for your application.
1:50 Finally, we took a simple prototype application
1:55 combined it with the playbook we built in Chapter Six
1:57 added enhanced tasks within our roles
1:59 to deploy the application, to ansibledeploymentexample.com.
2:03 You should now be able to use Ansible playbooks as a base
2:06 for automating deployments of your own applications.
2:08 You may need to look through Ansible's documentation
2:10 for some additional modules
2:12 depending on what you're trying to do
2:13 but you're well on your way towards using Ansible
2:15 for its intended purpose as a configuration management tool.
2:19 Remember, take a look at the
2:23 so you can take the Ansible playbook
2:25 modify it for your own purposes
2:26 and use it within your own projects.