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

Vagrant Ansible provision fails, ERROR! 'import_playbook' is not a valid attribute for a Play #315

Closed
DriftwoodJP opened this issue Feb 23, 2018 · 1 comment

Comments

@DriftwoodJP
Copy link
Contributor

DriftwoodJP commented Feb 23, 2018

Hello, vccw-team.

I have a vagrant provisioning problem, please help.

  • Operating System: Mac OS X 10.13.3
  • Vagrant Version: 2.0.2
  • Virtual Box Version: 5.2.6 r120293

I bumped VCCW version to v3.16.1 from v3.3.2.
Like this.

% vagrant box add vccw-team/xenial64
    :
==> box: Successfully added box 'vccw-team/xenial64' (v20180107) for 'virtualbox'!
% wp scaffold vccw [my_project] --update

Generating or Modify 9 files.

  • Vagrantfile
  • provision/default.yml
  • provision/playbook.yml
  • provision/playbooks/commands.yml
  • provision/playbooks/middleware.yml
  • provision/playbooks/wordpress.yml
  • provision/playbooks/templates/browse-command.php
  • provision/playbooks/templates/vccw.sh
  • provision/playbooks/templates/wp-cli.yml

And vagrant provision, but it is failed.

% vagrant provision==> [my_project]: [vagrant-hostsupdater] Checking for host entries
==> [my_project]: [vagrant-hostsupdater]   found entry for: 192.168.33.11 [my_project]
==> [my_project]: Running provisioner: ansible_local...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.2.0.0).

Alternatively, the compatibility mode can be specified in your Vagrantfile:
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode

    [my_project]: Running ansible-playbook...
ERROR! 'import_playbook' is not a valid attribute for a Play

The error appears to have been in '/vagrant/provision/playbook.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- import_playbook: playbooks/commands.yml
  ^ here

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Thanks.

@DriftwoodJP
Copy link
Contributor Author

DriftwoodJP commented Feb 24, 2018

I found the issue "Privacy Error #314".
I changed the hostname to *.test from *.dev in site.yml

 #
 # Network Settings
 #
-hostname: [my_project].dev
+hostname: [my_project].test

and vagrant up. (= build a new VM!)
Generating 2 files.

  • wp-cli.yml
  • wp-cli/browse-command.php

I can't understand Ansible provisioning, but It looks fine to me.
Thanks.

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

1 participant