Last active
August 29, 2015 14:17
-
-
Save ikuwow/a8d30da399ba635cf692 to your computer and use it in GitHub Desktop.
Ansibleでvagrant plugin install ref: http://qiita.com/ikuwow/items/207ccc862b7a9f8858dc
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
ASK: [List Installed Vagrant Plugins] **************************************** | |
ok: [localhost] | |
TASK: [Install Vagrant Plugins] *********************************************** | |
skipping: [localhost] => (item=vagrant-omnibus) | |
skipping: [localhost] => (item=vagrant-vbguest) | |
skipping: [localhost] => (item=vagrant-cachier) | |
skipping: [localhost] => (item=vagrant-vbox-snapshot) | |
skipping: [localhost] => (item=vagrant-aws) | |
skipping: [localhost] => (item=vagrant-digitalocean) |
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
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: no | |
tasks: | |
- name: List Installed Vagrant Plugins | |
shell: "vagrant plugin list | awk '{ print $1 }'" | |
changed_when: false | |
register: vagrant_plugin_list | |
- name: Install Vagrant Plugins | |
shell: "vagrant plugin install {{item}}" | |
with_items: | |
- vagrant-omnibus | |
- vagrant-vbguest | |
- vagrant-cachier | |
- vagrant-vbox-snapshot | |
- vagrant-aws | |
- vagrant-digitalocean | |
when: item not in vagrant_plugin_list.stdout_lines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment