M
M
Mika Slepinin2016-11-07 14:15:17
linux
Mika Slepinin, 2016-11-07 14:15:17

How to make Ansible look for files on localhost?

Good afternoon!
How to make Ansible look for files on localhost?
I do it like this:

---
- hosts: test
  tasks:
    - name: Find .war & .jar file on localhost
      find: paths="/var/lib/jenkins/workspace" patterns="*.war,*.jar"

And I get an error:
fatal: [127.0.0.1]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n", "unreachable": true}

How to make it look for files?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2016-11-07
@mikalaikaia

he needs to connect to himself via SSH ....
add to the playbook
connection: local

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question