Debian Codegraph @

lib/ansible/playbook/delegatable.py

raw
1 # -*- coding: utf-8 -*-
2 # Copyright The Ansible project
3 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
4 from __future__ import annotations
5
6 from ansible.playbook.attribute import FieldAttribute
7
8
9 class Delegatable:
10 delegate_to = FieldAttribute(isa='string')
11 delegate_facts = FieldAttribute(isa='bool')
12
13 def _post_validate_delegate_to(self, attr, value, templar):
14 """This method exists just to make it clear that ``Task.post_validate``
15 does not template this value, it is set via ``TaskExecutor._calculate_delegate_to``
16 """
17 return value