Zul*_*kis 4 postfix deployment ansible
在 ansible 1.5.4 中,以下命令完美运行:
- name: Generate postfix dhparams
command: "{{ item }}"
with_items:
- openssl gendh -out /etc/postfix/dh_512.pem -2 512 creates=/etc/postfix/dh_512.pem
- openssl gendh -out /etc/postfix/dh_2048.pem -2 2048 creates=/etc/postfix/dh_2048.pem
notify: Reload postfix
Run Code Online (Sandbox Code Playgroud)
升级到 1.9.1 后,命令失败并显示fatal: [127.0.0.1] => A variable inserted a new parameter into the module args. Be sure to quote variables if they contain equal signs (for example: "{{var}}").
错误。
正如{{ item }}
已经引用的那样,我不知道出了什么问题。
我怎样才能让这个命令再次工作?
查看https://github.com/ansible/ansible/issues/8260以了解有关为什么进行这种行为更改的详细信息(以防止在命令模块中注入额外的参数)。以下格式应该有效:
- name: Generate postfix dhparams
command: "{{ item.command }} creates={{ item.file}}"
with_items:
- { command: 'openssl gendh -out /etc/postfix/dh_512.pem -2 512', file: '/etc/postfix/dh_512.pem' }
- { command: 'openssl gendh -out /etc/postfix/dh_2048.pem -2 2048', file: '/etc/postfix/dh_2048.pem' }
notify: Reload postfix
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4538 次 |
最近记录: |