user2288360
user2288360

Reputation: 71

ansible-playbook consistenly fails as gathering facts phase

I've been tasked with implementing some new ansible playbooks as I'm the only one here with any experience with a configuration tool. Problem for me is that I've only ever used puppet, not ansible. No matter what I write for ansible, however, I constantly get:

TASK [Gathering Facts] *********************************************************************
fatal: [server1.example.com]: FAILED! => {"failed": true, "msg": "the connection plugin 'heck' was not found"}
fatal: [server2.example.com]: FAILED! => {"failed": true, "msg": "the connection plugin 'heck' was not found"}

Web searches for this error have been fruitless, but at first I thought I might have a problem with my ssh keys to these servers. Testing those showed that I can login with ssh without a password, however. So, now I'm stuck.

Anybody have thoughts on resolving this?

Upvotes: 4

Views: 13424

Answers (2)

Jon Cormier
Jon Cormier

Reputation: 309

I also got this error:

FAILED! => {"failed": true, "msg": "the connection plugin 'heck' was not found"}

My problem was I was trying to run in check mode but left off a "-" in my command.

I did this:

ansible-playbook foo.yml -check

instead of this:

ansible-playbook foo.yml --check

By leaving off the 2nd -, ansible-playbook thought I was using the connection option (with heck as the value...).

Upvotes: 30

user2288360
user2288360

Reputation: 71

I finally got everything working, and I believe the problem was due to my git environment, which is where I was running the playbook. I ended up uninstalling git and reinstalling it, and now everything runs OK. I saw the git issue when I could not commit any file change on either the server or my laptop. Since the laptop had been working, I performed the reinstall there, and that "fixed" the server.

Upvotes: -2

Related Questions