<p dir="auto">Roles would look cleaner if filenames were shortened from <code class="notranslate">roles/foo/tasks/main.yml</code> to <code class="notranslate">roles/foo/tasks.yml</code>. Counting a directory as a file, this would reduce the number of files inside role directories with 50%. Moreover, file lookup in editors such as sublime text would work better, because typing <code class="notranslate">roles/foo/tasks</code> is the shortest string that is guaranteed to give the correct file as the first hit.</p>
<p dir="auto">Of course, the old structure should still be supported too, for backward compatibility.</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">roles</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<p dir="auto">ansible 2.2.1.0<br>
config file =<br>
configured module search path = Default w/o overrides</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Roles would look cleaner if filenames were shortened from roles/foo/tasks/main.yml to roles/foo/tasks.yml</p>
<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0"><pre class="notranslate"><code class="notranslate">ansible 2.1.0
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">The directory structure would me much more compact if a file <code class="notranslate">roles/&lt;X&gt;/tasks.yml</code> were included as <code class="notranslate">roles/&lt;X&gt;/tasks/main.yml</code> is right now.</p>
<p dir="auto">When a project is organized in many, small(-ish) roles with only a few tasks/vars/etc each, the directory layout quickly becomes a nightmare to navigate. See the attached screenshot.</p>
<p dir="auto">While the standard layout tries to encourage a modular, include-based structure, many roles require just 2 or 3 tasks, which are easier to work with in a single file.</p>
<p dir="auto">Many editors and IDEs also support a <code class="notranslate">go to file</code> shortcut with fuzzy matching. These become somewhat useless when all files are named <code class="notranslate">main.yml</code>. The same is true for labels on tabs etc.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10232033/14765759/8c76ab74-09f0-11e6-9a5c-412ae880cd9e.png"><img src="https://cloud.githubusercontent.com/assets/10232033/14765759/8c76ab74-09f0-11e6-9a5c-412ae880cd9e.png" alt="screen shot 2016-04-24 at 07 22 36" style="max-width: 100%;"></a></p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Create a file <code class="notranslate">tasks.yml</code>, <code class="notranslate">meta.yml</code>... in a role directory.</p>
<h5 dir="auto">EXPECTED RESULTS</h5>

<p dir="auto">The tasks should be run, etc.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>

<p dir="auto">The tasks etc. are not run/included.</p>