Created
June 14, 2021 08:21
-
-
Save mgedmin/c13ccb467cf3b47f2a62e468d2cd64ef to your computer and use it in GitHub Desktop.
Example of an Ansible playbook that uses group_by
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
tasks: | |
- group_by: key="{{ 'using_letsencrypt' if letsencrypt_certs|default([]) else 'not_using_letsencrypt' }}" | |
changed_when: no | |
tags: always | |
- group_by: key="{{ ansible_distribution.lower() ~ '_' ~ ansible_distribution_release }}" | |
changed_when: no | |
tags: always | |
- hosts: using_letsencrypt:&ubuntu_xenial | |
roles: | |
- deadsnakes | |
- hosts: using_letsencrypt | |
roles: | |
- letsencrypt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment