Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yml file format error #5526

Closed
xiaoqiang2209 opened this issue Dec 29, 2017 · 6 comments
Closed

Yml file format error #5526

xiaoqiang2209 opened this issue Dec 29, 2017 · 6 comments

Comments

@xiaoqiang2209
Copy link

xiaoqiang2209 commented Dec 29, 2017

[root@cpdb01 tidb-ansible-master]# ansible-playbook local_prepare.yml
ERROR: file could not read: /root/tidb-ansible-master/roles/local/tasks/{{ deployment_method }}_deployment.yml
[root@cpdb01 tidb-ansible-master]# uname -a
Linux cpdb01.hfa.mysql 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@cpdb01 tidb-ansible-master]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@cpdb01 tidb-ansible-master]# cat inventory.ini |grep deployment_method
deployment_method = binary
[root@cpdb01 tidb-ansible-master]# ll /root/tidb-ansible-master/roles/local/tasks/binary_deployment.yml
-rw-r--r--. 1 root root 1403 Dec 22 12:02 /root/tidb-ansible-master/roles/local/tasks/binary_deployment.yml

@shenli shenli changed the title 解析yml文件报错 Yml file format error Dec 29, 2017
@shenli
Copy link
Member

shenli commented Dec 29, 2017

@LinuxGit PTAL

@LinuxGit
Copy link

@xiaoqiang2209 Hi. It seems that there's no deployment_method in yourtidb-ansible/inventory.ini file. See inventory.ini .

@xiaoqiang2209
Copy link
Author

@LinuxGit
[root@cpdb01 tidb-ansible-master]# cat inventory.ini |grep deployment_method
deployment_method = binary

@LinuxGit
Copy link

Hi, what's your ansible version? You can install it by following commands and try again.

yum install epel-release
yum install ansible

@xiaoqiang2209
Copy link
Author

@LinuxGit hi,
[root@cpdb01 tidb-ansible-master]# yum install epel-release
yum install ansibleLoaded plugins: fastestmirror
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Package epel-release-7-6.noarch already installed and latest version
Nothing to do
[root@cpdb01 tidb-ansible-master]# yum install ansible
Loaded plugins: fastestmirror
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Package ansible-1.9.2-1.el7.noarch already installed and latest version
Nothing to do
[root@cpdb01 tidb-ansible-master]# ansible --version
ansible 1.9.2
configured module search path = None

@LinuxGit
Copy link

LinuxGit commented Dec 29, 2017

@xiaoqiang2209 You need install Ansible 2.4.2 or later to your platform. See https://github.com/pingcap/docs/blob/master/op-guide/ansible-deployment.md#install-ansible-in-the-control-machine. Please uninstall your ansible package and install ansible from epel repo again.

@LinuxGit LinuxGit closed this as completed Apr 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants