Ansible hangs after parsing inventory











up vote
2
down vote

favorite












I'm using Ansible locally to configure my own machine and today (I haven't run the playbooks in a while) it all of a sudden started just hanging. I can't seem to run any playbooks at all, at least not locally. I'm at a new workplace and don't have any remote host handy to test on.



I'm using Ansible 2.7.1, running on a stripped down Ubuntu 18.04.



ansible.cfg:



[defaults]
inventory=inventory


inventory:



localhost ansible_connection=local


test (playbook):



---
- name: Test
hosts: all
tasks:
- debug:
msg: "I'm alive"


Here's the output:



$ ansible-playbook -vvvv test
ansible-playbook 2.7.1
config file = /home/tjarvstrand/playbooks/mini.iso/ansible.cfg
configured module search path = [u'/home/tjarvstrand/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Using /home/tjarvstrand/playbooks/mini.iso/ansible.cfg as config file
setting up inventory plugins
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet host_list requirements, check plugin documentation if this is unexpected
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet script requirements, check plugin documentation if this is unexpected
Set default localhost to localhost
Parsed /home/tjarvstrand/playbooks/mini.iso/inventory inventory source with ini plugin


After parsing the inventory, it's dead quiet. Please help



EDIT: I have also tested with inventory:



localhost ansible_connection=ssh


with the same result.



EDIT2:
ansible -vvvv all -m ping outputs:



ansible 2.7.1
config file = /home/tjarvstrand/playbooks/mini.iso/ansible.cfg
configured module search path = [u'/home/tjarvstrand/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Using /home/tjarvstrand/playbooks/mini.iso/ansible.cfg as config file
setting up inventory plugins
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet host_list requirements, check plugin documentation if this is unexpected
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet script requirements, check plugin documentation if this is unexpected
Set default localhost to localhost
Parsed /home/tjarvstrand/playbooks/mini.iso/inventory inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from /usr/local/lib/python2.7/dist-packages/ansible/plugins/callback/minimal.pyc
META: ran handlers


and then hangs










share|improve this question
























  • Could you try connecting to the local machine with SSH?
    – Madoc Comadrin
    Nov 7 at 13:31










  • Thanks, I did. Same result :/
    – tjarvstrand
    Nov 8 at 9:31










  • Did SSH connection produce any output that was different from local connection? What happens if you try command ansible all -m ping?
    – Madoc Comadrin
    Nov 8 at 11:24










  • Yeah, the output was exactly the same when using ssh. Pinging hangs too. I've updated my question with the output.
    – tjarvstrand
    Nov 8 at 16:27















up vote
2
down vote

favorite












I'm using Ansible locally to configure my own machine and today (I haven't run the playbooks in a while) it all of a sudden started just hanging. I can't seem to run any playbooks at all, at least not locally. I'm at a new workplace and don't have any remote host handy to test on.



I'm using Ansible 2.7.1, running on a stripped down Ubuntu 18.04.



ansible.cfg:



[defaults]
inventory=inventory


inventory:



localhost ansible_connection=local


test (playbook):



---
- name: Test
hosts: all
tasks:
- debug:
msg: "I'm alive"


Here's the output:



$ ansible-playbook -vvvv test
ansible-playbook 2.7.1
config file = /home/tjarvstrand/playbooks/mini.iso/ansible.cfg
configured module search path = [u'/home/tjarvstrand/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Using /home/tjarvstrand/playbooks/mini.iso/ansible.cfg as config file
setting up inventory plugins
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet host_list requirements, check plugin documentation if this is unexpected
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet script requirements, check plugin documentation if this is unexpected
Set default localhost to localhost
Parsed /home/tjarvstrand/playbooks/mini.iso/inventory inventory source with ini plugin


After parsing the inventory, it's dead quiet. Please help



EDIT: I have also tested with inventory:



localhost ansible_connection=ssh


with the same result.



EDIT2:
ansible -vvvv all -m ping outputs:



ansible 2.7.1
config file = /home/tjarvstrand/playbooks/mini.iso/ansible.cfg
configured module search path = [u'/home/tjarvstrand/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Using /home/tjarvstrand/playbooks/mini.iso/ansible.cfg as config file
setting up inventory plugins
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet host_list requirements, check plugin documentation if this is unexpected
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet script requirements, check plugin documentation if this is unexpected
Set default localhost to localhost
Parsed /home/tjarvstrand/playbooks/mini.iso/inventory inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from /usr/local/lib/python2.7/dist-packages/ansible/plugins/callback/minimal.pyc
META: ran handlers


and then hangs










share|improve this question
























  • Could you try connecting to the local machine with SSH?
    – Madoc Comadrin
    Nov 7 at 13:31










  • Thanks, I did. Same result :/
    – tjarvstrand
    Nov 8 at 9:31










  • Did SSH connection produce any output that was different from local connection? What happens if you try command ansible all -m ping?
    – Madoc Comadrin
    Nov 8 at 11:24










  • Yeah, the output was exactly the same when using ssh. Pinging hangs too. I've updated my question with the output.
    – tjarvstrand
    Nov 8 at 16:27













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I'm using Ansible locally to configure my own machine and today (I haven't run the playbooks in a while) it all of a sudden started just hanging. I can't seem to run any playbooks at all, at least not locally. I'm at a new workplace and don't have any remote host handy to test on.



I'm using Ansible 2.7.1, running on a stripped down Ubuntu 18.04.



ansible.cfg:



[defaults]
inventory=inventory


inventory:



localhost ansible_connection=local


test (playbook):



---
- name: Test
hosts: all
tasks:
- debug:
msg: "I'm alive"


Here's the output:



$ ansible-playbook -vvvv test
ansible-playbook 2.7.1
config file = /home/tjarvstrand/playbooks/mini.iso/ansible.cfg
configured module search path = [u'/home/tjarvstrand/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Using /home/tjarvstrand/playbooks/mini.iso/ansible.cfg as config file
setting up inventory plugins
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet host_list requirements, check plugin documentation if this is unexpected
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet script requirements, check plugin documentation if this is unexpected
Set default localhost to localhost
Parsed /home/tjarvstrand/playbooks/mini.iso/inventory inventory source with ini plugin


After parsing the inventory, it's dead quiet. Please help



EDIT: I have also tested with inventory:



localhost ansible_connection=ssh


with the same result.



EDIT2:
ansible -vvvv all -m ping outputs:



ansible 2.7.1
config file = /home/tjarvstrand/playbooks/mini.iso/ansible.cfg
configured module search path = [u'/home/tjarvstrand/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Using /home/tjarvstrand/playbooks/mini.iso/ansible.cfg as config file
setting up inventory plugins
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet host_list requirements, check plugin documentation if this is unexpected
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet script requirements, check plugin documentation if this is unexpected
Set default localhost to localhost
Parsed /home/tjarvstrand/playbooks/mini.iso/inventory inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from /usr/local/lib/python2.7/dist-packages/ansible/plugins/callback/minimal.pyc
META: ran handlers


and then hangs










share|improve this question















I'm using Ansible locally to configure my own machine and today (I haven't run the playbooks in a while) it all of a sudden started just hanging. I can't seem to run any playbooks at all, at least not locally. I'm at a new workplace and don't have any remote host handy to test on.



I'm using Ansible 2.7.1, running on a stripped down Ubuntu 18.04.



ansible.cfg:



[defaults]
inventory=inventory


inventory:



localhost ansible_connection=local


test (playbook):



---
- name: Test
hosts: all
tasks:
- debug:
msg: "I'm alive"


Here's the output:



$ ansible-playbook -vvvv test
ansible-playbook 2.7.1
config file = /home/tjarvstrand/playbooks/mini.iso/ansible.cfg
configured module search path = [u'/home/tjarvstrand/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Using /home/tjarvstrand/playbooks/mini.iso/ansible.cfg as config file
setting up inventory plugins
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet host_list requirements, check plugin documentation if this is unexpected
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet script requirements, check plugin documentation if this is unexpected
Set default localhost to localhost
Parsed /home/tjarvstrand/playbooks/mini.iso/inventory inventory source with ini plugin


After parsing the inventory, it's dead quiet. Please help



EDIT: I have also tested with inventory:



localhost ansible_connection=ssh


with the same result.



EDIT2:
ansible -vvvv all -m ping outputs:



ansible 2.7.1
config file = /home/tjarvstrand/playbooks/mini.iso/ansible.cfg
configured module search path = [u'/home/tjarvstrand/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
Using /home/tjarvstrand/playbooks/mini.iso/ansible.cfg as config file
setting up inventory plugins
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet host_list requirements, check plugin documentation if this is unexpected
/home/tjarvstrand/playbooks/mini.iso/inventory did not meet script requirements, check plugin documentation if this is unexpected
Set default localhost to localhost
Parsed /home/tjarvstrand/playbooks/mini.iso/inventory inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from /usr/local/lib/python2.7/dist-packages/ansible/plugins/callback/minimal.pyc
META: ran handlers


and then hangs







ansible






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 16:25

























asked Nov 7 at 9:18









tjarvstrand

114




114












  • Could you try connecting to the local machine with SSH?
    – Madoc Comadrin
    Nov 7 at 13:31










  • Thanks, I did. Same result :/
    – tjarvstrand
    Nov 8 at 9:31










  • Did SSH connection produce any output that was different from local connection? What happens if you try command ansible all -m ping?
    – Madoc Comadrin
    Nov 8 at 11:24










  • Yeah, the output was exactly the same when using ssh. Pinging hangs too. I've updated my question with the output.
    – tjarvstrand
    Nov 8 at 16:27


















  • Could you try connecting to the local machine with SSH?
    – Madoc Comadrin
    Nov 7 at 13:31










  • Thanks, I did. Same result :/
    – tjarvstrand
    Nov 8 at 9:31










  • Did SSH connection produce any output that was different from local connection? What happens if you try command ansible all -m ping?
    – Madoc Comadrin
    Nov 8 at 11:24










  • Yeah, the output was exactly the same when using ssh. Pinging hangs too. I've updated my question with the output.
    – tjarvstrand
    Nov 8 at 16:27
















Could you try connecting to the local machine with SSH?
– Madoc Comadrin
Nov 7 at 13:31




Could you try connecting to the local machine with SSH?
– Madoc Comadrin
Nov 7 at 13:31












Thanks, I did. Same result :/
– tjarvstrand
Nov 8 at 9:31




Thanks, I did. Same result :/
– tjarvstrand
Nov 8 at 9:31












Did SSH connection produce any output that was different from local connection? What happens if you try command ansible all -m ping?
– Madoc Comadrin
Nov 8 at 11:24




Did SSH connection produce any output that was different from local connection? What happens if you try command ansible all -m ping?
– Madoc Comadrin
Nov 8 at 11:24












Yeah, the output was exactly the same when using ssh. Pinging hangs too. I've updated my question with the output.
– tjarvstrand
Nov 8 at 16:27




Yeah, the output was exactly the same when using ssh. Pinging hangs too. I've updated my question with the output.
– tjarvstrand
Nov 8 at 16:27










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










It turns out this was a user error. I have a local ssh wrapper that was messing things up. I still can't figure out why this causes problems even on a local connection though but at least now I can work around it.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1373381%2fansible-hangs-after-parsing-inventory%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    It turns out this was a user error. I have a local ssh wrapper that was messing things up. I still can't figure out why this causes problems even on a local connection though but at least now I can work around it.






    share|improve this answer

























      up vote
      0
      down vote



      accepted










      It turns out this was a user error. I have a local ssh wrapper that was messing things up. I still can't figure out why this causes problems even on a local connection though but at least now I can work around it.






      share|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        It turns out this was a user error. I have a local ssh wrapper that was messing things up. I still can't figure out why this causes problems even on a local connection though but at least now I can work around it.






        share|improve this answer












        It turns out this was a user error. I have a local ssh wrapper that was messing things up. I still can't figure out why this causes problems even on a local connection though but at least now I can work around it.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 24 at 18:12









        tjarvstrand

        114




        114






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1373381%2fansible-hangs-after-parsing-inventory%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...