Fix typo and uses more common role syntax in usage examples (#60165)

* Fix typo and use import_role in examples
This commit is contained in:
Jeff Geerling 2019-08-16 09:34:45 -05:00 committed by Alicia Cozine
parent da18e3b76c
commit 9c61ef10d1

View file

@ -394,8 +394,9 @@ This works for roles or any type of plugin distributed within the collection:
- hosts: all
tasks:
- include_role:
name : my_namespace.my_collection.role1
- import_role:
name: my_namespace.my_collection.role1
- my_namespace.mycollection.mymodule:
option1: value
@ -403,7 +404,7 @@ This works for roles or any type of plugin distributed within the collection:
msg: '{{ lookup("my_namespace.my_collection.lookup1", 'param1')| my_namespace.my_collection.filter1 }}'
To avoid a lot of typing, you can use the ``collections`` keyword added in Ansbile 2.8:
To avoid a lot of typing, you can use the ``collections`` keyword added in Ansible 2.8:
.. code-block:: yaml
@ -412,8 +413,9 @@ To avoid a lot of typing, you can use the ``collections`` keyword added in Ansbi
collections:
- my_namespace.my_collection
tasks:
- include_role:
- import_role:
name: role1
- mymodule:
option1: value