Skip to content

Instantly share code, notes, and snippets.

@swalkinshaw
Forked from patio11/ansible-snippet.yaml
Last active August 29, 2015 14:24
Show Gist options
  • Save swalkinshaw/84ae2b51b6437a7fc1e5 to your computer and use it in GitHub Desktop.
Save swalkinshaw/84ae2b51b6437a7fc1e5 to your computer and use it in GitHub Desktop.
vars:
starfighters:
- username: patrick
github: patio11
name: "Patrick McKenzie"
- username: thomas
github: tqbf
name: "Thomas Ptacek"
- username: erin
github: boboTjones
name: "Erin Ptacek"
tasks:
- name: Create group for the starfighters
group: name=fighters
- name: Create founder accounts and grant us sudo privileges
user: name="{{item.username}}" comment="{{item.name}}" groups=fighters,admin shell=/bin/bash
with_items: starfighters
- name: Install public keys
authorized_key: user="{{item.username}}" key="https://github.com/{{item.github}}.keys"
with_items: "{{ starfighters }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment