---
title: "Discussion on \"How to use ansible variables in a role\" | Hashnode"
description: "Discussion on \"How to use ansible variables in a role\". Example using a local role, and the defaults variables of the role"
url: "https://hashnode.com/posts/how-to-use-ansible-variables-in-a-role/63c6f31d7a243fb9cb2624b7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to use ansible variables in a role](https://blog.danielabg.com/how-to-use-ansible-variables-in-a-role?utm_source=hashnode&utm_medium=feed)

Example using a local role, and the defaults variables of the role

Jan 17, 2023 · 2 min read · blog.danielabg.com  
Updated Jan 19, 2023  
Read the article

-   [#ansible](https://hashnode.com/tag/ansible)
-   [#windows](https://hashnode.com/tag/windows)
-   [#roles](https://hashnode.com/tag/roles)
-   [#variables](https://hashnode.com/tag/variables)
-   [#conditional-statement](https://hashnode.com/tag/conditional-statement)

## Written by

[Daniela Becerra](https://hashnode.com/@danibish)

@danibish

  
[View profile](https://hashnode.com/@danibish)

Devops Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
