vccw-team/vccw

Encountered ansible error

Closed this issue ยท 5 comments

Operating System: macOS High Sierra version10.13.2
Vagrant Version: 2.0.1
Virtual Box Version: 5.2.6

When I tried to vagrant up, I encountered ansible error like below. Is this because of my environment? Or is this issue to be fixed?


==> vccw.test: Running provisioner: ansible_local...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.3.2.0).

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

    vccw.test: 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.

in your provision/playbook.yml
change
-- import_playbook: playbooks/commands.yml
-- import_playbook: playbooks/middleware.yml
-- import_playbook: playbooks/wordpress.yml
to
-- include: playbooks/commands.yml
-- include: playbooks/middleware.yml
-- include: playbooks/wordpress.yml
I create a pull request for the fix, still waiting for the merge

Thanks @javaongsan :)

HI @naogify @javaongsan

Have you tried latest version of VCCW?
https://github.com/vccw-team/vccw/releases

We updated a box and ansible, so I am hoping we don't have this problem with the latest version.
include will be removed at ansible 2.8, so we shouldn't use it.

Thanks. ๐Ÿ˜Š

Ah, I found the reason.
https://github.com/vccw-team/vccw/blob/master/Vagrantfile#L46

Please update box for VCCW.

$ vagrant box update

I will update VCCW too. ๐Ÿ˜Š

Thanks @miya0001 @javaongsan :)
It works!