mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Added ansible loop example
This commit is contained in:
@@ -123,6 +123,18 @@ ansible-galaxy remove namespace.role
|
||||
var: password | password_hash('sha512', salt)
|
||||
```
|
||||
|
||||
## Loops
|
||||
|
||||
```yaml
|
||||
- name: Fail when one of the given variables is an empty string.
|
||||
when: lookup('vars', item) == ''
|
||||
ansible.builtin.fail:
|
||||
msg: "The {{ item }} variable is an empty string"
|
||||
loop:
|
||||
- variable1
|
||||
- variableN
|
||||
```
|
||||
|
||||
## Roles
|
||||
|
||||
### Get roles
|
||||
|
||||
Reference in New Issue
Block a user