Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

roles

Define automation that can be reused in multiple plays and even shared for others to use on Ansible Galaxy.

A role can define variables with defaults that can be overrided by the consumers to customize its behaviors.

Creating the namespace.name pseudo-role

You can facilitate the reuse of the role playbooks by creating a self-referencing symbolic link via running the following commands after replacing the placeholder strings in the project directory in a text terminal:

ln_opts=(
    # Create symbolic link instead of hard link
    --symbolic

    # Use relative path as link destination to prevent broken links if the hosting project's path changes
    --relative

    # Overwrite existing links
    --force

    # Increase verbosity
    --verbose
)
ln "${ln_opts[@]}" . playbooks/roles/_namespace_._name_

References

The following materials are referenced during the writing of this README: