Skip to content

Instantly share code, notes, and snippets.

@mattwillsher
Last active December 15, 2015 02:39
Show Gist options
  • Save mattwillsher/5188907 to your computer and use it in GitHub Desktop.
Save mattwillsher/5188907 to your computer and use it in GitHub Desktop.
Ansible simple interfaces into playbooks
This playbook, in playbooks/sshd/set_key_value.yml:
---
- name: Set sshd_config $key $value
hosts: $hosts
vars_files:
- [ "vars/$ansible_distribution.yml", "vars/os_defaults.yml" ]
tasks:
- include: tasks/set_config_item.yml key=$key value=$value
handlers:
- include: handlers/sshd.yml
Called by:
---
- include: ../../../playbooks/sshd/set_key_value.yml hosts=all key=UseDNS value=no
- include: ../../../playbooks/sshd/set_key_value.yml hosts=all key=ForwardX11 value=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment