【发布时间】:2021-10-08 03:00:46
【问题描述】:
yaml 代码
- hosts: all
tasks:
#Import Remi GPG key - see: http://rpms.famillecollet.com/RPM-GPG-KEY-remi
wget http://rpms.famillecollet.com/RPM-GPG-KEY-remi \ -O /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
#Install Remi repo
rpm -Uvh --quiet \
http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
安装 EPEL 存储库。
yum install epel-release
安装 Node.js(npm 及其所有依赖项)。
yum --enablerepo=epel install node
编译时出现以下错误:ERROR! Syntax Error while loading YAML.
错误似乎出现在“/home/shahzad/playbook.yml”中:行 7,第 3 列,但可能在文件中的其他位置,具体取决于确切的 语法问题。
违规行似乎是:
wget http://rpms.famillecollet.com/RPM-GPG-KEY-remi \ -O /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
^ here
exception type: <class 'yaml.scanner.ScannerError'>
exception: while scanning a simple key
in "<unicode string>", line 6, column 3
could not find expected ':'
in "<unicode string>", line 7, column 3
【问题讨论】:
-
能否请您发布您的 yaml 代码?这似乎不是正确的 yaml 代码。
标签: ansible