나는 가능성있는 플레이 북을 가지고있다. 재생 목록을 실행할 때 사용할 환경 파일을 지정합니다.플레이 북을 플레이 북에 포함시키고 환경 파일을 정의하는 것
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
도 env/LAB3
를 사용할 필요가
이 보이는cac
이 무엇인지 압니다. 다른 설정을해야합니까?
포함 파일과 env 파일을 공유하십시오. – Shasha99