我想知道如何將我的SSH公鑰複製到使用Ansible的許多主機上。 第一次嘗試: ansible all -i inventory -m local_action -a "ssh-copy-id {{ inventory_hostname }}" --ask-pass
但我有錯誤The module local_action was not found in configured module
我想檢查Ansible中的字典列表中是否存在某個鍵/值對。 我發現了這個問題,但我不知道如果語法從蟒蛇ansible不同 Check if value already exists within list of dictionaries? 我已經嘗試過,當條件(我從來沒有見過ansible if語句!): when: '"value" not in list'
但是我對此沒有任何運氣。 例如,
Ansible playbook拋出語法錯誤,但一切看起來正確。 什麼是角色的問題? 錯誤: The error appears to have been in '/home/Desktop/playbooks/xx.yml': line 6, column 7, but may
be elsewhere in the file depending on the exact syntax pro