Majic Projects
Majic Ansible Roles
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png Majic Ansible Roles / Closed Enhancement MAR-114 Clean-up task syntax in all roles
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue basics
  • Type of issue
    Enhancement
  • Category
    Not determined
  • Targetted for
    1.7.0
  • Status
    Closed
  • Progress
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    8 hours
  • Time spent
    6 hours
    Click here to see time logged against this issue
Issue details
  • Resolution
    RESOLVED
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description

At the moment most of the roles use the simplified syntax for tasks where task arguments are specified in parameter=value format. It would be better to switch to full, extended YAML syntax instead - this should improve readability, and might resolve some issues related to linting checks.

Additionally, a number of set_facts tasks are used in a couple of different roles. It would be useful to replace as many as possible with using the defaults/main.yml, since it would resolve some issues in future if tags are getting introduced.

Another useful feature would be to standardise a bit on ordering of with_items, become, become_user etc within task definitions to make it more readable. In particular, module name and its parameters would be best off left at the end of task definition.

The following should be done:

  • Replace any outstanding set_facts tasks with defaults/main.yml if possible.
  • Update task syntax in all roles to use the expanded form.
  • Update task syntax to have the following ordering of parameters:
    • name
    • module and its parameters.
    • become
    • become_user
    • when
    • with_items/with_dict/with_nested
    • wait_for
    • register
    • changed_when
    • failed_when
    • no_log
    • notify
    • task tags.
  • Update development documentation to include a styling section, describing that expanded syntax is preferred to one-line one, as well as ordering of elements in task definition.
  • Ensure all tests are still passing.
Todos (0 / 0)
There are no comments