Chapter 10: Automating Linux Administration Tasks
Ansible Linux automation quiz
Seventeen questions across the six administration areas. Aim for at least thirteen before moving on to the review chapter.
- Which task updates every installed package?
- You add a repository with `gpgcheck: true`. What else is needed?
- How do you run a task only on hosts where the httpd package is installed?
- What does `append: true` change in the user module?
- Why does a user task with `password_hash("sha512")` report changed on every run?
- Which module installs a public key for SSH logins?
- Where should a sudo rule for a group go?
- What does this task schedule?
- How do you remove a cron job created by Ansible?
- What makes `multi-user.target` the default boot target?
- Why reboot from a handler rather than a normal task?
- In which order are the storage modules needed for a new LVM file system?
- A logical volume is grown with lvol. What else is needed to use the space?
- Which mount state mounts the file system now and at every boot?
- Which variable of the storage system role describes a volume group and its logical volumes?
- How do you set the default boot target idempotently with commands?
- Which variable of the network system role lists the connection profiles to configure?
- Why practise network changes on an extra interface?
- Which task packs only the **contents** of `/srv/app` into an archive on the managed host?
- An `unarchive` task has `src: /tmp/app.tar.gz` and no other source option. Where does Ansible look for the archive?