我正在开发一个将Linux系统joinActive Directory的剧本。 我似乎无法find一种方法来将ansible_hostname的值转换为大写。 我需要运行的一个命令需要以大写forms提供主机名。
正如赫克托·巴尔韦德(Hector Valverde)所言,似乎是这样
{{ ansible_hostname|upper }}
…而不是“大写”
在我的情况下,将variables的值转换为大写的pipe道variables,如上所示:
{{ ansible_hostname|upper }}