Apacheをインストールし、設定ファイルをコピーしてから起動し、実行するように設定する必要があります。私は空白や再配置をいじって試してみました危険なプレイブック - Apacheのインストール/設定エラー
error: ERROR! Syntax Error while loading YAML.
The error appears to have been in '/etc/ansible/playbook.yml': line 3, column 1, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- hosts: example
tasks:
^ here
:ansible-playbook playbook.yml
、私はこれを受け取る:私は、コマンドを実行すると、しかし
---
- hosts: example
tasks:
- name:Install Apache
command: yum install --quiet -y httpd httpd-devel
- name:Copy configuration files
command:>
cp httpd.conf /etc/httpd/conf/httpd.conf
- command:>
cp httpd-vshosts.conf /etc/httpd/conf/httpd-vshosts.conf
- name:Start Apache and configure it to run
command: service httpd start
- command: chkconfig httpd on
:ここ
は、これまでに書かれた脚本であります私はまだこのエラーを受け取ります。私はそれが私がここで欠けている小さなものだと確信していますが、それは終わりに私を悩ませている!どんな助けもありがとう!本当にありがとう。
ありがとうございます。それは私のために働いた..問題は空白であった! –