Skip to content

Through Stackstorm- stanley user Ansible playbook is not working #45

@sadanand25

Description

@sadanand25

[root@------ st2]# st2 --version
st2 3.0.1, on Python 2.7.5
[root@------ st2]# pip show st2client
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
[root@----- st2]# uname -a
Linux 3.10.0-957.10.1.el7.x86_64 #1 SMP Thu Feb 7 07:12:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@----- st2]# python --version
Python 2.7.5
Ansible version: ansible 2.8.5

Below is output of "st2 get execution"
Problem: I trying to fetch data from windows server but seems error.

My Observation: from root user ansible playbook is working
from Stanley user: ansible playbook reporting error. Please help to solve issue.

[root@------ ~]# st2 execution get 5ea02200e8182d2642231eca
id: 5ea02200e8182d2642231eca
status: failed (8s elapsed)
parameters:
cmd: ansible-playbook /etc/ansible/database/bchecktest1.yml -i /etc/ansible/database/host -e 'HOSTNAME=hostname'
result:
failed: true
return_code: 2
stderr: ' [WARNING]: Consider using the replace, lineinfile or template module rather
than running ''sed''. If you need to use command because replace, lineinfile or
template is insufficient you can add ''warn: false'' to this command task or set
''command_warnings=False'' in ansible.cfg to get rid of this message.'
stdout: "
PLAY [Firstcheck] **************************************************************

TASK [printing echo] ***********************************************************
changed: [hostname]

TASK [debug] *******************************************************************
ok: [hostname] => {
"echo.stdout": "hostname"
}

TASK [printing ip] *************************************************************
changed: [hostname]

TASK [debug] *******************************************************************
ok: [hostname] => {

TASK [seting facts] ************************************************************
ok: [hostname -> localhost]

TASK [copy] ********************************************************************
ok: [hostname -> localhost]

TASK [hostname_grepping] *******************************************************
changed: [hostname -> localhost]

TASK [value finding] ***********************************************************
changed: [hostname -> localhost]

TASK [check last Backup status(checking hostname is present in the backup list or not )] ***
fatal: [hostname]: FAILED! => {"msg": "winrm or requests is not installed: No module named winrm"}
...ignoring

TASK [fetching file from windows] **********************************************
fatal: [hostname -> 123.2312.123.0]: FAILED! => {"changed": false, "file": "L:\automation\hostname.txt", "msg": "unable to calculate the checksum of the remote file"}

PLAY RECAP *********************************************************************
hostname : ok=11 changed=4 unreachable=0 failed=1 skipped=0 rescued=0 ignored=1
"
succeeded: false
[root@------ ~]#

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions