Last active
February 28, 2017 16:05
-
-
Save timss/813a98ae4ab1ccab47f4b21ea8b194a3 to your computer and use it in GitHub Desktop.
Ansible 'become' clause for include statements
This file contains hidden or 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
# ./roles/foo/tasks/main.yml | |
- include: foo.yml | |
- include: foo.yml | |
become: yes | |
# ./roles/foo/tasks/foo.yml | |
- lineinfile: | |
dest: "~/.bashrc" # resolves '~' on runtime as any other command', unlike ansible_env.HOME | |
regexp: "^HISTSIZE=.*" | |
line: "HISTSIZE=10000" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment