私は無責任なプレイブックを持っています。私がプレイブックを実行するときに、使用する環境ファイルを指定します。プレイブックをプレイブックに組み込んで環境ファイルを定義する
ansible-playbook playbooks/release-deploy.yaml -i env/LAB3
私は別のプレイブックを呼び出していますが、同じ環境ファイルを使用したいと思います。
私の現在の設定は次のとおりです。
- include: tasks/replace_configs.yaml
だから私は脚本を実行すると、私はエラーを取得:
TASK [include] *****************************************************************
fatal: [10.169.99.70]: FAILED! => {"failed": true, "reason": "no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in '/home/ansible/playbooks/tasks/replace_configs.yaml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- hosts: cac
^here
The error appears to have been in '/home/ansible/playbooks/tasks/replace_configs.yaml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- hosts: cac
^here
"}
tasks/replace_configs.yaml
もそれはdoesnのようenv/LAB3
が見える使用する必要がありますどのようなcac
が知っている。別の設定を行う必要がありますか?
インクルードファイルとenvファイルを共有してください – Shasha99