Last active
August 29, 2015 14:17
-
-
Save bhcopeland/3a196cc1fb968eeb5f03 to your computer and use it in GitHub Desktop.
Ensures a option is in fstab using ansible. In this case nobootwait and noatime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Ensure fstab uses nobootwait and noatime | |
mount: | |
name: "{{ item.mount }}" | |
src: "{{ item.device }}" | |
fstype: "{{ item.fstype }}" | |
opts: "{{ item.options.split(',') | union(['nobootwait','noatime']) | join(',') }}" | |
state: present | |
with_items: ansible_mounts | |
when: item.options.find("nobootwait") == -1 or item.options.find("noatime") == -1 | |
tags: | |
- fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment