evolution / wordpress

Rapidly create, develop, & deploy WordPress across multiple environments.
MIT License
200 stars 18 forks source link

Ansible 2.5 error #180

Open germanny opened 6 years ago

germanny commented 6 years ago

Hi @EvanK!

When I set up my new machine, sudo pip install ansible automatically installed Ansible 2.5. I found I was unable to create any new VMs through Evolution. I kept getting the same error (below). It took a bit of tracking down, but what I think I discovered is that Ansible 2.5 is not compatible with Evolution. When I downgraded to Ansible 2.3.2.0, I was able to create a new Evolution VM. This is the first time I've had an issue with the Ansible version, so I thought I would point it out.

~/Sites/CMN/BestColleges.com  ⑂ master +    vagrant up
Bringing machine 'local' up with 'virtualbox' provider...
==> local: Importing base box 'ubuntu/trusty64'...
==> local: Matching MAC address for NAT networking...
==> local: Checking if box 'ubuntu/trusty64' is up to date...
==> local: Setting the name of the VM: BestCollegescom_local_1526251449742_48222
==> local: Clearing any previously set forwarded ports...
==> local: Clearing any previously set network interfaces...
==> local: Preparing network interfaces based on configuration...
    local: Adapter 1: nat
    local: Adapter 2: hostonly
==> local: Forwarding ports...
    local: 22 (guest) => 4514 (host) (adapter 1)
==> local: Running 'pre-boot' VM customizations...
==> local: Booting VM...
==> local: Waiting for machine to boot. This may take a few minutes...
    local: SSH address: 127.0.0.1:4514
    local: SSH username: vagrant
    local: SSH auth method: private key
    local:
    local: Vagrant insecure key detected. Vagrant will automatically replace
    local: this with a newly generated keypair for better security.
    local:
    local: Inserting generated public key within guest...
    local: Removing insecure key from the guest if it's present...
    local: Key inserted! Disconnecting and reconnecting using new SSH key...
==> local: Machine booted and ready!
==> local: Checking for guest additions in VM...
    local: The guest additions on this VM do not match the installed version of
    local: VirtualBox! In most cases this is fine, but in rare cases it can
    local: prevent things such as shared folders from working properly. If you see
    local: shared folder errors, please make sure the guest additions within the
    local: virtual machine match the version of VirtualBox you have installed on
    local: your host and reload your VM.
    local:
    local: Guest Additions Version: 4.3.36
    local: VirtualBox Version: 5.2
==> local: Setting hostname...
==> local: Configuring and enabling network interfaces...
==> local: Exporting NFS shared folders...
==> local: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> local: Mounting NFS shared folders...
==> local: [vagrant-hostmanager:guests] Updating hosts file on active guest virtual machines...
==> local: [vagrant-hostmanager:host] Updating hosts file on your workstation (password may be required)...
==> local: Running provisioner: hostmanager...
==> local: Running provisioner: ssh-cleanup (local_shell)...
Host local.bestcolleges.com not found in /Users/germanny/.ssh/known_hosts
Host 192.168.145.104 not found in /Users/germanny/.ssh/known_hosts
==> local: Running provisioner: ansible...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.5.2).

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

    local: Running ansible-playbook...
[DEPRECATION WARNING]: [defaults]hostfile option, The key is misleading as it
can also be a list of hosts, a directory or a list of paths , use [defaults]
inventory=/path/to/file|dir instead. This feature will be removed in version
2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False
 in ansible.cfg.
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and
make sure become_method is 'sudo' (default). This feature will be removed in
version 2.6. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
 [WARNING]: Ignoring invalid attribute: sudo

PLAY [local] *******************************************************************

TASK [Gathering Facts] *********************************************************
ok: [local.bestcolleges.com]

TASK [prepare : Test distro and version, as we only support specifically Ubuntu 14] ***
skipping: [local.bestcolleges.com]

TASK [prepare : Test existance of evolution init script] ***********************
ok: [local.bestcolleges.com]

TASK [prepare : Stop any existing evolution services] **************************
skipping: [local.bestcolleges.com]

TASK [common : Domain] *********************************************************
ok: [local.bestcolleges.com] => {
    "domain": "bestcolleges.com"
}

TASK [common : Stage] **********************************************************
ok: [local.bestcolleges.com] => {
    "stage": "local"
}

TASK [common : New Hostname] ***************************************************
ok: [local.bestcolleges.com] => {
    "new_hostname": "local.bestcolleges.com"
}

TASK [common : Determine static or dynamic resolv.conf] ************************
changed: [local.bestcolleges.com]

TASK [common : Update nameservers in resolv.conf] ******************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: OSError: [Errno 13] Permission denied: '/run/resolvconf/.ansible_tmpYaakRqresolv.conf'
fatal: [local.bestcolleges.com]: FAILED! => {"changed": false, "msg": "The destination directory (/run/resolvconf) is not writable by the current user. Error was: [Errno 13] Permission denied: '/run/resolvconf/.ansible_tmpYaakRqresolv.conf'"}
    to retry, use: --limit @/Users/germanny/Sites/CMN/BestColleges.com/lib/ansible/provision.retry

PLAY RECAP *********************************************************************
local.bestcolleges.com     : ok=6    changed=1    unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
 ~/Sites/CMN/BestColleges.com  ⑂ master +    ansible --version
ansible 2.5.2
  config file = /Users/germanny/Sites/CMN/BestColleges.com/ansible.cfg
  configured module search path = [u'/Users/germanny/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.15 (default, May  1 2018, 16:44:08) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)]
EvanK commented 6 years ago

Yikes. Yeah, I haven't done much maintenance on these playbooks in a while.

In the meantime, lets stick to 2.3.2.0