├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, Jimena Cabrera Notari 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 21 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ansible-snippets 2 | 3 | Ansible Vim snippets for SnipMate and UltiSnips. 4 | 5 | ## Requirements 6 | 7 | * [UtilSnips](https://github.com/SirVer/ultisnips) or [SnipMate](https://github.com/garbas/vim-snipmate) 8 | 9 | ## Install 10 | 11 | Depending on what plugin manager you are using, copy the appropiate lines and 12 | use the plugin's install command: 13 | 14 | * [Vim-plug](https://github.com/junegunn/vim-plug) 15 | 16 | ```vim 17 | Plug 'phenomenes/ansible-snippets' 18 | ``` 19 | 20 | * [Vundle](https://github.com/gmarik/vundle) 21 | 22 | ```vim 23 | Plugin 'phenomenes/ansible-snippets' 24 | ``` 25 | 26 | * [NeoBundle](https://github.com/Shougo/neobundle.vim) 27 | 28 | ```vim 29 | NeoBundle 'phenomenes/ansible-snippets' 30 | ``` 31 | 32 | * [Pathogen](https://github.com/tpope/vim-pathogen) 33 | 34 | ```shell 35 | git clone https://github.com/phenomenes/ansible-snippets.git ~/.vim/bundle/terraform-snippets 36 | ``` 37 | 38 | This repo follows [ansible](https://github.com/ansible/ansible)'s `devel` 39 | branch, if you wish to install a different version you need to specify the 40 | corresponding tag. 41 | 42 | ## Usage 43 | 44 | Open a `.yml` or `.yaml` file, in insert mode type `play` or any Ansible's 45 | module name and press `` to expand the snippet: 46 | 47 | ``` 48 | - hosts: group 49 | user: root 50 | tasks: 51 | 52 | - name: task_description 53 | ec2: 54 | image: None 55 | instance_type: None 56 | #kernel: 57 | #monitoring: 58 | #user_data: 59 | #termination_protection: 60 | #private_ip: 61 | #spot_type: one-time 62 | #ec2_url: 63 | #id: 64 | #source_dest_check: True 65 | #aws_secret_key: 66 | #spot_wait_timeout: 600 67 | ... 68 | ``` 69 | 70 | Press `` again to move to the next argument. 71 | 72 | ## License 73 | 74 | BSD 2-clause "Simplified" License 75 | --------------------------------------------------------------------------------