Skip to content

New install, Ansible error while GATHERING FACTS #73

Closed

Description

@pixelbacon
  1. OSX v10.10.4
  2. VirtualBox v4.3.26
  3. Newly installed evolve generator, Ansible, and sshpass.
  4. All default options in yo evolve wordpress.
  5. Ansible errors out trying to GATHER FACTS

1 _bash_2015-07-27_15-34-35

Activity

  1. EvanK commented on Jul 27, 2015

    @EvanK
    Contributor

    @pixelbacon: Can you try the following:

    1. destroy the vm with vagrant destroy
    2. Edit your generated Vagrantfile to remove the lines deleted in this diff
    3. try another vagrant up
  2. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    That helped a bit, got to PLAY RECAP with ok=83 and changes=70.

    But it hitting local.example.com takes a long time to resolve, eventually goes to http://local.example.com/wp/wp-admin/install.php and times out.

  3. EvanK commented on Jul 28, 2015

    @EvanK
    Contributor

    I think that was it!

    @pixelbacon: Please try the following...

    1. destroy the vm
    2. re-run the generator (yo evolve wordpress), which will use the latest minor release of 1.2.0
    3. try one more vagrant up

    Thanks!

  4. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    Still same issue. Server hangs... Had the same issue on Genesis too. Going to try disabling varnish.

  5. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    All options turned off... Default everything. No https...

    Server still hangs.

  6. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    Got it to http://local.greenvalleyorganics.com/wp/wp-admin/install.php but times out.

  7. EvanK commented on Jul 28, 2015

    @EvanK
    Contributor

    What does your Vagrantfile look like?

  8. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author
    Vagrant.configure("2") do |config|
      # Configuring the hostmanager to automatically alter the hosts file for development testing
      config.hostmanager.enabled            = true
      config.hostmanager.include_offline    = true
      config.hostmanager.ignore_private_ip  = false
      config.hostmanager.manage_host        = true
    
      # Every Vagrant virtual environment requires a box to build off of.
      config.vm.box         = "ubuntu/trusty64"
    
      # Configure 1GB (1024MB) of memory
      config.vm.provider :virtualbox do |vb|
        vb.customize ["modifyvm", :id, "--memory", 1024]
        vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
      end
    
      config.vm.define :local do |box|
        box.vm.hostname = "local.example.com"
    
        # Static IP for testing.
        box.vm.network :private_network, ip: "192.168.113.103"
        box.vm.network :forwarded_port, guest: 22, id: 'ssh', host: 1313, auto_correct: true
    
        # Remount the default shared folder as NFS for caching and speed
        box.vm.synced_folder ".", "/vagrant", :nfs => true
    
        # Provision local.example.com
        box.vm.provision :ansible do |ansible|
          ansible.playbook = "lib/ansible/provision.yml"
          ansible.inventory_path = "lib/ansible/hosts"
          ansible.limit = "local"
          ansible.extra_vars = { stage: "local" }
        end
      end
    
      # Update IPs
      config.vm.provision :hostmanager
    end
    
  9. EvanK commented on Jul 28, 2015

    @EvanK
    Contributor

    Got it! Vagrantfile's using example.com for the domain, but your project appears to be expecting greenvalleyorganics.com.

    Can you try this: https://gist.github.com/EvanK/bcc323d1e90fab9a8ab9/revisions#diff-0

  10. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    Apologies, i mistyped that. I was trying on an actual project. Wasn't getting any results, so created a brand new folder just using example.

    So it's not that :(

  11. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    @EvanK Do you not have any issues if doing an absolutely clean generator project?

  12. EvanK commented on Jul 28, 2015

    @EvanK
    Contributor

    I do not. Can you step through the test suite, and post your output from npm test?

    cd ~/.cache/yeoman/evolution/wordpress/v1.2.0/
    npm install
    chmod +x ./bin/*
    ./bin/mock
    (cd temp && vagrant up)
    npm test

    edit: fixed yeoman cache directory

  13. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    no ./bin

  14. EvanK commented on Jul 28, 2015

    @EvanK
    Contributor

    And you're in ~/.cache/yeoman/evolution/wordpress/v1.2.0/? What do you get from ls -al?

  15. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    README.md functional unit

  16. EvanK commented on Jul 28, 2015

    @EvanK
    Contributor

    Sounds like you're in the test subdirectory -- my fault, I initially gave you the wrong path.

    One more try...can you follow those steps again, but from the below directory, which should have bin, lib, and test subdirectories:

    cd ~/.cache/yeoman/evolution/wordpress/v1.2.0/
    
  17. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    Did. Same thing.

    sshed into the box. pinged localhost, get fast results back. odd.

    So, checked my hosts file... there is a TON of # vagrant-hostmanager-start. Even after destroying the vms, properly shutting them down, etc. I generally don't use that plugin to do what it does.

    So, that ended up being the issue. The vagrant-hostmanager plugin was not removing, despite vagrant halt then vagrant destroy.

    Apologies for not doing that sooner... Derp.

  18. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    In summary:

    vagrant-hostmanager plugin was not cleaning up after itself for some reason. I'm thinking there's something about the plugin that loses track of itself.

  19. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    Yea, destroyed a vagrant instance, and the hosts don't go away... I'd rethink the need for specifying vagrant-hostmanager plugin and look into another one.

    BTW... GREAT WORK. This is a ridiculously robust set of code ya got.

  20. EvanK commented on Jul 28, 2015

    @EvanK
    Contributor

    Aha...thanks for letting me know!

    I'll add something to the FAQ for now, and look into a fix or replacement for hostmanager in the longer term

  21. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    Of course. I usually rely on vagrant-hostsupdater for it's simplicity. Haven't had issues with it, and have used for a long time.

  22. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    Also, I'd tip a hat to this post, since this is a very robust solution it might be useful to some folks.

  23. EvanK commented on Jul 28, 2015

    @EvanK
    Contributor

    Wow. I'm not sure about the proportions (1/4 of system memory?!), but optimizing vagrant's performance is certainly worth digging into!

  24. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    I tend to need it when doing massive imports for images. It's never actually gotten in the way. The script can also easily be tweaked to 1/5, 1/6, etc.

    I'd just recommend making a small call out to it. In fact I'll make a pull request :)

  25. pixelbacon commented on Jul 28, 2015

    @pixelbacon
    Author

    Also, come to think about it, 1/4 memory replicates a server more than anything less than that. So, it does have it's benefits :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions