Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support normal YAML syntax for tasks #4

Open
ypid opened this issue Apr 29, 2017 · 2 comments
Open

Support normal YAML syntax for tasks #4

ypid opened this issue Apr 29, 2017 · 2 comments

Comments

@ypid
Copy link

ypid commented Apr 29, 2017

First of all, thanks very much for the plugin, great stuff 👍

The "inline" format advocated by Ansible in the paste is now basically deprecated (ref: https://www.ansible.com/blog/ansible-best-practices-essentials 3. Use Native YAML Syntax). Official docs should also be mostly up-to-date by now.

It seems that Rocannon does not support the regular YAML syntax for tasks omni-completion?

Example:

- name: configure telegraf
  template:
    src: telegraf.conf.j2
    dest: /etc/telegraf/telegraf.conf
  notify: restart telegraf
@MicahElliott
Copy link
Owner

Hey, thanks Robin.

I wasn't aware that they are discouraging the inline syntax. That's a shame. I'd be pretty surprised if they actually tried to deprecate it, though. In one of my ansible projects with ~300 tasks, the average one-line module-task length is ~60 chars. I actually really like to see source code files stay within 70-80 chars, but playbooks are exceptions. It would be awful to put every one of these onto 3 or more lines. So I won't personally be adopting the multi-line syntax unless forced.

With that rant out of the way, I did actually want to support multi-line, but didn't get to it. It'd be significantly harder than the single line syntax. I'd suggest the secondary indented keys to be colored different than the module.

I'm not going to work on adding support for this (syntax highlighting and completion), but it would be great if someone wants to give it a shot.

@CedricLevasseur
Copy link

Oh no. I realize this plugin is obsolete. Why did i installed it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants