# Syntax description of a task

**URL:** <https://forum.ansible.com/t/syntax-description-of-a-task/27149>\
**Category:** Ansible Project\
**Created:** [March 29, 2018, 3:54pm UTC](https://forum.ansible.com/t/syntax-description-of-a-task/27149 "2018-03-29T15:54:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmoullia](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@cmoullia](https://forum.ansible.com/u/cmoullia)\
**Post date:** [March 29, 2018, 3:54pm UTC](https://forum.ansible.com/t/syntax-description-of-a-task/27149/1 "2018-03-29T15:54:22Z")

</div>

Hi,

Is it possible to describe tasks in one line as we can for a role ?

Role is defined in one line →   
`

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [March 29, 2018, 4:14pm UTC](https://forum.ansible.com/t/syntax-description-of-a-task/27149/2 "2018-03-29T16:14:10Z")

</div>

You could, although I find it much less readable to define on 1 line, by using pseudo json which YAML understands how to parse.

Basically:

- {name: “Install launcher”, import\_role: {name: launcher, tasks\_from: install.yml}, tags: [install\_launcher]}
