Size: a a a

2021 February 21

NL

Nikolay Litvinov in Ansible
Возможно в одинарных  { } или в экранировании $
источник

АХ

Алексей Харламов... in Ansible
мне обычно такая хрень выдается в случаях когда ошибка более чем в кавычках, например не в том месте таск объявляю
источник

АХ

Алексей Харламов... in Ansible
а name почему без дефиса в самом начале?
источник

АХ

Алексей Харламов... in Ansible
это правильно?
источник

NL

Nikolay Litvinov in Ansible
"1 - перед become: yes - так должно быть ?
источник

PG

Pavel Gassan in Ansible
with_items:
это опция таска а не модуля
источник

PG

Pavel Gassan in Ansible
вынесите его на уровень с именем таска
источник

D

Dmitry in Ansible
Поправил.
- name: Initialize Wordpress site
  command: "{{ item }} chdir: /var/www/wordpress/{{domain}}"
   with_items:
    - "wp core download --locale=ru_RU --path=/var/www/wordpress/{{domain}}"
    - "wp core config --dbname=${DB_NAME} --dbuser=${DB_NAME} --dbpass=${DB_PASSWORD} --dbprefix={{domain}}}wp_"
    - "wp core install --url={{domain}} --title={{domain}} --admin_user={{wpuser}} --admin_password={{wppassword}} --admin_email={{wpmail}}"

ERROR! Syntax Error while loading YAML.
 mapping values are not allowed in this context

The error appears to be in '/home/magi/.ansible/ansible-wordpress-lemp-cerbot-fail2ban-ufw/roles/wordpress/tasks/main.yml': line 57, column 11, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Initialize Wordpress site
  command: "{{ item }} chdir: /var/www/wordpress/{{domain}}"
         ^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:

   with_items:
     - {{ foo }}

Should be written as:

   with_items:
     - "{{ foo }}"
источник

АХ

Алексей Харламов... in Ansible
вот я ж говорю
источник

АХ

Алексей Харламов... in Ansible
что не в кавычках дело
источник

PG

Pavel Gassan in Ansible
Dmitry
Поправил.
- name: Initialize Wordpress site
  command: "{{ item }} chdir: /var/www/wordpress/{{domain}}"
   with_items:
    - "wp core download --locale=ru_RU --path=/var/www/wordpress/{{domain}}"
    - "wp core config --dbname=${DB_NAME} --dbuser=${DB_NAME} --dbpass=${DB_PASSWORD} --dbprefix={{domain}}}wp_"
    - "wp core install --url={{domain}} --title={{domain}} --admin_user={{wpuser}} --admin_password={{wppassword}} --admin_email={{wpmail}}"

ERROR! Syntax Error while loading YAML.
 mapping values are not allowed in this context

The error appears to be in '/home/magi/.ansible/ansible-wordpress-lemp-cerbot-fail2ban-ufw/roles/wordpress/tasks/main.yml': line 57, column 11, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Initialize Wordpress site
  command: "{{ item }} chdir: /var/www/wordpress/{{domain}}"
         ^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:

   with_items:
     - {{ foo }}

Should be written as:

   with_items:
     - "{{ foo }}"
😑
источник

PG

Pavel Gassan in Ansible
- name: Initialize Wordpress site
   command: "{{ item }} chdir: /var/www/wordpress/{{domain}}"
 with_items:
источник

L

Lamobot in Ansible
Dmitry
Поправил.
- name: Initialize Wordpress site
  command: "{{ item }} chdir: /var/www/wordpress/{{domain}}"
   with_items:
    - "wp core download --locale=ru_RU --path=/var/www/wordpress/{{domain}}"
    - "wp core config --dbname=${DB_NAME} --dbuser=${DB_NAME} --dbpass=${DB_PASSWORD} --dbprefix={{domain}}}wp_"
    - "wp core install --url={{domain}} --title={{domain}} --admin_user={{wpuser}} --admin_password={{wppassword}} --admin_email={{wpmail}}"

ERROR! Syntax Error while loading YAML.
 mapping values are not allowed in this context

The error appears to be in '/home/magi/.ansible/ansible-wordpress-lemp-cerbot-fail2ban-ufw/roles/wordpress/tasks/main.yml': line 57, column 11, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Initialize Wordpress site
  command: "{{ item }} chdir: /var/www/wordpress/{{domain}}"
         ^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:

   with_items:
     - {{ foo }}

Should be written as:

   with_items:
     - "{{ foo }}"
Сразу можно в доку отправлять...
command:
 cmd: '{{ item }}'
 chdir: '...'
или
command: '{{ item }} chdir=/var/www/wordpress/{{domain}}'
источник

PG

Pavel Gassan in Ansible
и хватит кидать код и ошибки плейн текстом, съедаются отступы
источник

PG

Pavel Gassan in Ansible
кидайте на pastebin
источник

L

Lamobot in Ansible
Я уж не говорю про опечатки такого плана
--dbprefix={{domain}}}wp_
источник

D

Dmitry in Ansible
Блин :( Не получается ничего 😩
источник

D

Dmitry in Ansible
На pastebin без регистрации нельзя уже сейчас?
источник

АХ

Алексей Харламов... in Ansible
медицина тут бессильна)
источник

D

Dmitry in Ansible
В двойных, одинарных,...
источник