From the course: Red Hat Certified Engineer (EX294) Cert Prep: 3 Managing Systems with Ansible
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating a playbook to manage services
From the course: Red Hat Certified Engineer (EX294) Cert Prep: 3 Managing Systems with Ansible
Creating a playbook to manage services
- [Instructor] The majority of modern Linux distributions use systemd to manage their net process. As such, we'll mostly be covering how to manage services using the systemd module. If you're using a distribution that does not use systemd, you can substitute the service, upstart, sysvinit modules, in most cases, depending on which one your managed host uses. The simplest example of the systemd module, looks exactly like the service module. You could substitute service for systemd, and this will still work. This uses the systemd module and specifies that the httpd service date should be started, and it should do so on boot as well. Since we're starting system services, we'll need admin privileges. In this example, I'm using become equals true to run sidu. We could also use dash uroute when we execute the playbook. Let's look at a more complex example. We may want to shorten our playbook and, or start multiple services at…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.