mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-21 19:33:03 +00:00
Made some further addendums to README file well as renamed the hosts in the zeromq playbook, and the guests in the Vagrantfile. I could create a local Ansible playbook which would copy public SSH keys to all of the hosts, automatically.
This commit is contained in:
parent
813ecbdb70
commit
4eaf7c7662
3 changed files with 14 additions and 5 deletions
11
README.md
11
README.md
|
@ -16,4 +16,15 @@ Future Playbooks:
|
|||
* **Ruby** - open source highlevel interprited programming language
|
||||
* **RVM** - open source Ruby version and environment manager
|
||||
|
||||
Before running these Ansible playbooks, or any Ansible commands for that matter, it is essential that you have your publick SSH keys copied to your server's `~/.ssh/authorized_keys` file. The following command will copy your public key from your management computer, to the server:
|
||||
|
||||
# Don't space out and forget to ensure that you replace the username and ip/host address with your specific credentials.
|
||||
$ scp ~/.ssh/id_rsa.pub username@111.222.333.444:~/.ssh/authorized_keys
|
||||
|
||||
Then all you have to do, as long as you have properly installed Ansible, and have added it's location to your $PATH, is run the following command to confirm that everything is hunky-dory:
|
||||
|
||||
$ ansible all -m ping
|
||||
|
||||
That should tell you whether Ansible has the ability to contact, and SSH into, the servers that you've added to your Ansible hosts file in `/etc/ansible/hosts`
|
||||
|
||||
It's that simple.
|
4
Vagrantfile
vendored
4
Vagrantfile
vendored
|
@ -9,8 +9,8 @@ Vagrant::Config.run do |config|
|
|||
# Every Vagrant virtual environment requires a box to build off of.
|
||||
config.vm.box = 'precise64'
|
||||
config.vm.network :bridged, :bridge => 'en1: Wi-Fi (AirPort)'
|
||||
config.vm.define :chat1
|
||||
config.vm.define :chat2
|
||||
config.vm.define :server
|
||||
config.vm.define :client
|
||||
|
||||
# This enables provisioning through Ansible. The only current issue is that when this is enabled, it seems that Vagrant only boots up one VM and provisions it, not two, and certainly not two concurrently...
|
||||
# config.vm.provision :ansible do |ansible|
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# This command will need to be run in order to copy your public key from your management computer, to the server:
|
||||
# scp ~/.ssh/id_rsa.pub username@111.222.333.444:~/.ssh/authorized_keys
|
||||
---
|
||||
- hosts: chat_clients
|
||||
- hosts: virtual_machines
|
||||
user: vagrant
|
||||
sudo: yes # Is it possible to only run certain actions as sudo ansible?
|
||||
tasks:
|
||||
|
|
Loading…
Reference in a new issue