Last active
August 29, 2015 14:26
-
-
Save orlissenberg/c3a9441a230f151b6227 to your computer and use it in GitHub Desktop.
Ansible tricks.
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
--- | |
# http://docs.ansible.com/ansible/playbooks_conditionals.html | |
- name: Get platform specific variables. | |
include_vars: "{{ansible_os_family}}.yml" | |
when: ansible_os_family == "Debian" or ansible_os_family == "RedHat" | |
# Ansible 1.9 introduced the new becomes syntax | |
# http://stackoverflow.com/questions/21344777/how-to-switch-a-user-per-task-or-set-of-tasks | |
- name: checkout repo | |
git: repo=https://github.com/some/repo.git version=master dest={{ dst }} | |
become: yes | |
become_user: some_user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment