its the only error i get this is the playbook I tried with script and with
shell
- name: Show Running Configuration
register: show_run
ios_command:
commands:
- show run
provider: "{{ cli }}"
- debug: var=show_run.stdout_lines
- copy:
content: "{{ show_run.stdout[0] }}"
dest: "{{ backup_root }}/{{ inventory_hostname }}_show_run.txt"
- name: Compare
script: /Network_Automation_Ansible/backups/show_run/./comp.sh
On Mon, Aug 28, 2017 at 8:07 AM, Soniya panwar <[email protected]>
wrote:
> Hey, this error seems to generic, can you please provide more on this
> error?
>
> On Monday, August 28, 2017 at 2:40:18 PM UTC+5:30, Tcpip wrote:
>>
>> In the script I added the full path of both files and know i get this
>> error
>>
>> fatal: [SW1]: FAILED! => {"changed": true, "failed": true, "rc": 1,
>> "stderr": "", "stdout": "", "stdout_lines": []}
>>
>> Thanks
>>
>> On Mon, Aug 28, 2017 at 5:59 AM, Juraj Papic <[email protected]> wrote:
>>
>>> Hello Fayad,
>>>
>>> Yes they exist in the folder if I execute the script directly in the
>>> folder (sh diff.sh or bash diff.sh) it works.
>>>
>>> thanks.
>>>
>>> On Mon, Aug 28, 2017 at 5:58 AM, Fayad <[email protected]> wrote:
>>>
>>>> Both files SW1_show_run.txt and SW2_show_run.txt exist at the
>>>> destination?
>>>>
>>>> Also try giving full path to the files.
>>>>
>>>>
>>>> Fayad
>>>>
>>>> Sent from my OnePlus One
>>>>
>>>> On 28-Aug-2017 2:18 PM, "Juraj Papic" <[email protected]> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I get the following error
>>>>>
>>>>> fatal: [SW2]: FAILED! => {"changed": true, "failed": true, "rc": 2, "
>>>>> stderr": "diff: SW1_show_run.txt: No such file or directory\ndiff:
>>>>> SW2_show_run.txt: No such file or directory\n", "stdout": "",
>>>>> "stdout_lines": []}
>>>>>
>>>>> This is my script
>>>>> diff SW1_show_run.txt SW2_show_run.txt >> diff.txt
>>>>>
>>>>> And this is how I add it to my plabook
>>>>> - script: /Network_Automation_Ansible/backups/show_run/comp.sh
>>>>>
>>>>> Thanks all
>>>>>
>>>>> On Mon, Aug 28, 2017 at 3:12 AM, Phonthip Namkaew <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> There are so-called < post tasks >. Search the documentation.
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to a topic in
>>>>>> the Google Groups "Ansible Project" group.
>>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>>>>> pic/ansible-project/cdLTpgsOluk/unsubscribe.
>>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>> [email protected].
>>>>>> To post to this group, send email to [email protected].
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/ansible-project/556fab38-
>>>>>> 5ede-4667-892c-426a8e4888c5%40googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Juraj A Papic
>>>>>
>>>>> --
>>>>> 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 [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/ansible-project/CAAjdA%2Ba
>>>>> tUyYmTHUjObSL1g-W_%3D23pL6UUZ506N6CK5EYx7kZPQ%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/ansible-project/CAAjdA%2BatUyYmTHUjObSL1g-W_%3D23pL6UUZ506N6CK5EYx7kZPQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "Ansible Project" group.
>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>>> pic/ansible-project/cdLTpgsOluk/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> [email protected].
>>>> To post to this group, send email to [email protected].
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/ansible-project/CAFFLvzfDS%3DqjVq6fbzTJMGPSdn1qjpUg5wnK9
>>>> uGWCxnQzQB-oA%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/ansible-project/CAFFLvzfDS%3DqjVq6fbzTJMGPSdn1qjpUg5wnK9uGWCxnQzQB-oA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Juraj A Papic
>>>
>>
>>
>>
>> --
>>
>> Juraj A Papic
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ansible-project/cdLTpgsOluk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/b35b6544-03fe-4048-9dbe-5ddfa375e87a%40googlegroups.
> com
> <https://groups.google.com/d/msgid/ansible-project/b35b6544-03fe-4048-9dbe-5ddfa375e87a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Juraj A Papic
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAAjdA%2BbeMb7oaSQ-ebj-HRJeL4K0GeGWBr5mZPVL7_3-qbVgJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.