Hi  Team,

Am  trying to run the shutdown command in my ansible master server using
the below  command

[tester@ansi ~]$ sudo ansible Total -m shell  -a "/usr/sbin/shutdown -h now"

got  the  error  message  as

server 1 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: Permission denied
(publickey,gssapi-keyex,gssapi-with-mic,password).\r\n",
    "unreachable": true


but  when i  use  the

ansible Total -a "/bin/date"

am  able  to  get  the result  kindly  assit






Regards
Kannappan M
+91-9894921536


On Sun, May 20, 2018 at 10:13 PM, <ansible-project@googlegroups.com> wrote:

> ansible-project@googlegroups.com
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/ansible-project/topics>
>  Google
> Groups
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview>
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview>
> Today's topic summary
> View all topics
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/ansible-project/topics>
>
>    - Check if all the values of a yml matches a string else throw error
>    and exit in ansible <#m_-8274689085338957318_group_thread_0> - 7
>    Updates
>    - Decrypting/Encrypting Ansible Vault on Windows
>    <#m_-8274689085338957318_group_thread_1> - 1 Update
>    - Ansible Command Module Argument Entry
>    <#m_-8274689085338957318_group_thread_2> - 4 Updates
>    - How to Use Ansible to Determine differing features of a Machine
>    <#m_-8274689085338957318_group_thread_3> - 1 Update
>    - Passing variable value from one role to the next using Ansible for
>    AWS <#m_-8274689085338957318_group_thread_4> - 1 Update
>
> Check if all the values of a yml matches a string else throw error and
> exit in ansible
> <http://groups.google.com/group/ansible-project/t/1cbe22b26c73a65?utm_source=digest&utm_medium=email>
> BIJAY PARIDA <bijay.cr...@gmail.com>: May 19 10:48PM -0700
>
> Hi,
>
>
> I have two files file1.yml and file2.yml which I am passing from the
> deployment level.
>
> I want to verify that all the values of the file1 matches to a string else
> exits with error ...more
> <http://groups.google.com/group/ansible-project/msg/3c3cff81389c3?utm_source=digest&utm_medium=email>
> Kai Stian Olstad <ansible-project+l...@olstad.com>: May 20 10:28AM +0200
>
> On 20.05.2018 07:48, BIJAY PARIDA wrote:
>
> > Both value1 and value2 are different and I want to check the respective
> > files and their values.
>
> > And assert the condition file1.values | uniqe == ...more
> <http://groups.google.com/group/ansible-project/msg/aa63af153d112?utm_source=digest&utm_medium=email>
> BIJAY PARIDA <bijay.cr...@gmail.com>: May 20 02:30AM -0700
>
> Thanks a lot Kai for the response. Here I don't want to include the vars,
> just want to check if the file exists and it contains the string.
>
> Is there any alternate? I meant without using the ...more
> <http://groups.google.com/group/ansible-project/msg/3cff5fc1dba1e?utm_source=digest&utm_medium=email>
> BIJAY PARIDA <bijay.cr...@gmail.com>: May 20 03:12AM -0700
>
> The length comparison works well.
>
> But when comparing the string it fails.
>
> - assert:
>
> # that: "file1values | unique | length == 1"
> that: file1values.get('values') | ...more
> <http://groups.google.com/group/ansible-project/msg/3d23a37326235?utm_source=digest&utm_medium=email>
> Kai Stian Olstad <ansible-project+l...@olstad.com>: May 20 12:20PM +0200
>
> On 20.05.2018 11:30, BIJAY PARIDA wrote:
> > vars,
> > just want to check if the file exists and it contains the string.
>
> > Is there any alternate? I meant without using the include_vars option.
> ...more
> <http://groups.google.com/group/ansible-project/msg/aac5639d6197c?utm_source=digest&utm_medium=email>
> Kai Stian Olstad <ansible-project+l...@olstad.com>: May 20 12:29PM +0200
>
> On 20.05.2018 12:12, BIJAY PARIDA wrote:
> > that: file1values.get('values') | unique == 'drop' - Tried
> > with
> > get values.
>
> file1values is a list so the get method wont work. ...more
> <http://groups.google.com/group/ansible-project/msg/aacd3fbdf7d04?utm_source=digest&utm_medium=email>
> BIJAY PARIDA <bijay.cr...@gmail.com>: May 20 03:34AM -0700
>
> Thanks a lot for the help, I will take it forward from here to add some
> more conditional checks.
>
> --
> Bijay
>
> On Sunday, 20 May 2018 15:59:26 UTC+5:30, Kai Stian Olstad wrote:
> ...more
> <http://groups.google.com/group/ansible-project/msg/3d36d9c3e5cef?utm_source=digest&utm_medium=email>
> Back to top <#m_-8274689085338957318_digest_top>
> Decrypting/Encrypting Ansible Vault on Windows
> <http://groups.google.com/group/ansible-project/t/96b4af616aa21932?utm_source=digest&utm_medium=email>
> Jordan Borean <jborea...@gmail.com>: May 19 11:10PM -0700
>
> Hey
>
> This is a shameless self post but recently I've been spending some time
> trying to understand how Ansible Vault works and I decided to apply what I
> learnt by creating some PowerShell cmdlets ...more
> <http://groups.google.com/group/ansible-project/msg/3c502727b0a22?utm_source=digest&utm_medium=email>
> Back to top <#m_-8274689085338957318_digest_top>
> Ansible Command Module Argument Entry
> <http://groups.google.com/group/ansible-project/t/eedd40e24fb4401?utm_source=digest&utm_medium=email>
> Carlton Patterson <cpatte7...@gmail.com>: May 19 10:10AM -0700
>
> I'm trying to use Ansible's 'command' module to to issue the command
> 'hostname -s' on a machine.
>
> Can someone please take a look at the module and its arguments and let me
> know where I would ...more
> <http://groups.google.com/group/ansible-project/msg/39a79c47be395?utm_source=digest&utm_medium=email>
> Karl Auer <ka...@2pisoftware.com>: May 20 03:25AM +1000
>
> This runs your command on localhost:
>
> ---
> # Test where vars are located
> - hosts: localhost
>
> tasks:
> - name: run hostname command
> command: hostname -s
>
> If you substitute the ...more
> <http://groups.google.com/group/ansible-project/msg/a74f71aed0757?utm_source=digest&utm_medium=email>
> Jean-Yves LENHOF <jean-y...@lenhof.eu.org>: May 19 07:37PM +0200
>
> Hi,
>
> Why using command to have the hostname ? (command and shell module
> should be avoided each time it is possible) Fact already have some
> variable you can use, no ?
>
> Example on my personnal ...more
> <http://groups.google.com/group/ansible-project/msg/a7599a9ebe1fd?utm_source=digest&utm_medium=email>
> Jordan Borean <jborea...@gmail.com>: May 19 03:40PM -0700
>
> While yes running hostname as a command seems redundant in this example
> (if you gather facts). If you do want to run a command anyway you want to
> put it in the free form box. ...more
> <http://groups.google.com/group/ansible-project/msg/3ac7b43bafa13?utm_source=digest&utm_medium=email>
> Back to top <#m_-8274689085338957318_digest_top>
> How to Use Ansible to Determine differing features of a Machine
> <http://groups.google.com/group/ansible-project/t/5f5197346b2d590f?utm_source=digest&utm_medium=email>
> Andy Smith <a...@strugglers.net>: May 19 06:07PM
>
> Hello,
>
> On Fri, May 18, 2018 at 03:30:31PM -0700, Carlton Patterson wrote:
> > Can someone let me know how to use ansible to determine the differences
> > between two machines.
>
> Have a look at all ...more
> <http://groups.google.com/group/ansible-project/msg/a774606baafc3?utm_source=digest&utm_medium=email>
> Back to top <#m_-8274689085338957318_digest_top>
> Passing variable value from one role to the next using Ansible for AWS
> <http://groups.google.com/group/ansible-project/t/86b774db6890c1e5?utm_source=digest&utm_medium=email>
> Karl Auer <ka...@2pisoftware.com>: May 20 03:12AM +1000
>
> In spite of the examples, it looks to me as if there is no "instance"
> element in the return value from the rds module. I haven't used it, I'm
> just reading the doco. Nor does there seem to be an ...more
> <http://groups.google.com/group/ansible-project/msg/a74454a63f844?utm_source=digest&utm_medium=email>
> Back to top <#m_-8274689085338957318_digest_top>
> You received this digest because you're subscribed to updates for this
> group. You can change your settings on the group membership page
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/ansible-project/join>
> .
> To unsubscribe from this group and stop receiving emails from it send an
> email to ansible-project+unsubscr...@googlegroups.com.
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CABxrqnGKUtvRfxgqcNrzzop_h-9MzmV5jKj5OAnoyTgfEFfC4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to