Skip to content

Instantly share code, notes, and snippets.

@gbirke
gbirke / adduser_github_sshpub_key.yml
Created March 27, 2017 12:38 — forked from shohey1226/adduser_github_sshpub_key.yml
Ansible playbook add user using public ssh key on Github
---
- name: add user and create ssh key
user: name=shohei
- name: dowanload pubkey from Github and placed as authorized_keys
get_url: url=https://github.com/shohey1226.keys dest=/tmp/shohei.authorized_keys
delegate_to: 127.0.0.1
- name: Create authorized_keys from the file that just downloaded
authorized_key: user=shohei key="{{ lookup('file', '/tmp/shohei.authorized_keys') }}"
<?php
/*
* Copyright 2014 Paul Ferrett <paul@paulferrett.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0