Administrator password parsing error while using run as

17 views
Skip to first unread message

Manish Kumar

unread,
Sep 30, 2019, 8:46:20 AM9/30/19
to Ansible Project
Hi All,

 I am getting error while using below playbook . Any idea how it can be achieved .
---
- name: install Disribution Server
  gather_facts: no
  hosts: win

  vars_prompt:
    - name: "Password"
      prompt: "Enter password"
      private: yes
  tasks:
    - name: Install services
      script: files/rps.ps1
      become: yes
      remote_user : administrator
      become_method: runas



Error:

# ansible-playbook -i inventry.yml install.yml

[WARNING] Ansible is in a world writable directory (/U01/automation/playbooks), ignoring it as an ansible.cfg source.

[WARNING]: Unable to parse /U01/automation/playbooks/inventry.yml as an

inventory source

 

[WARNING]: No inventory was parsed, only implicit localhost is available

 

[WARNING]: provided hosts list is empty, only localhost is available. Note

that the implicit localhost does not match 'all'

 

Enter password:

 [WARNING]: Could not match supplied host pattern, ignoring: win

 

 

PLAY [install Disribution Server] **********************************************

skipping: no hosts matched

 

PLAY RECAP *********************************************************************

Kai Stian Olstad

unread,
Sep 30, 2019, 1:09:00 PM9/30/19
to ansible...@googlegroups.com
On 30.09.2019 14:46, Manish Kumar wrote:
> [WARNING]: Could not match supplied host pattern, ignoring: win
>
>
> PLAY [install Disribution Server]
> **********************************************
>
> skipping: no hosts matched

You have no host or group called win in your inventory.


--
Kai Stian Olstad

Mauricio Tavares

unread,
Sep 30, 2019, 1:28:47 PM9/30/19
to ansible...@googlegroups.com
> [WARNING]: No inventory was parsed, only implicit localhost is available

Which would make sense, since his inventory file is not being
read to begin with, which is causing the playbook to be run (according
to error messages) on localhost. And then, Mayor flees in panic.

To the Original Poster, how about if you check why ansible does
not like /U01/automation/playbooks/inventry.yml?
>
> --
> Kai Stian Olstad
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6a5f901f-0190-5212-9f2b-6b80afbac558%40olstad.com.

Mark Anthony Garcia

unread,
Sep 30, 2019, 1:37:23 PM9/30/19
to ansible...@googlegroups.com
I think it's the spelling of your inventory in the playboook.  You posted inventry.yml instead of inventory.yml, I assume.

Mark

Reply all
Reply to author
Forward
0 new messages