PUREFA_URL and PUREFA_API environment variables if url and api_token arguments are not passed to the module directly.--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAE_gQfUdPurAMF9Q4mpProD4BeGjDbaJ5tSqwqXekUMAC%2Bf4Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Make sure you have the respective purestorage python library.
Also, setPUREFA_URLandPUREFA_APIenvironment variables if url and api_token arguments are not passed to the module directly.
Maybe forgot a delegate_to and you execure the module on remote host?
---# Perform PURE Flasharray Database snapshots- name: perform PURE volume snapshotpurefa_snap:name: Oracle/db2-prod-oracledbsuffix: snapfa_url: "{{ fa_url }}"api_token: "{{ apiToken }}"
This code doesn't prove that's running locally.
modules will only run on localhost if the playbook have "hosts:
localhost" or "connection: local".
If not, the module will run on remote host(s) unless you have
"delegate_to: localhost" on the task(s).
--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAE_gQfXzMbYKa27b%3Ds1FsCwrihvvgX0M0eTD1Enss4%2BWaoQZmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jonathan lozada de la matta
AUTOMATION PRACTICE
how did you install the python library purestorage ?
--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAE_gQfUXi7ZRdQLWsDJZOp2%3DOu4ph-r-HDtseZkO51PAnOuGkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
did you use a virtualenv? did you u do it as root? did you do it as your user? did you do pip install --user ?
---- name: Oracle Database Snapshotshosts: dbserversremote_user: oraclesudo: truesudo_user: rootvars_files:- vars/arrays.yaml- vars/database.yamltasks:# Take Snapshot of database volumes- include: tasks/take_snapshot.yamlrun_once: yes
---# Perform PURE Flasharray Database snapshots- name: perform PURE volume snapshotpurefa_snap:
name: db2-prod-oracledb
suffix: snapfa_url: "{{ fa_url }}"api_token: "{{ apiToken }}"
oracle[DR]@db2:~$pip freeze |grep purestorageDEPRECATION: 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.purestorage==1.16.0
Or just keep "hosts: dbservers" and add "delegate_to: localhost" on the
purefa_snap task.
Then you don't have to deal the SDK on the remote machine since the
module Python code is run on localhost.
[root@db2 ~]# /usr/bin/python -c 'import sys; print sys.path;> import purestorage'['', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/usr/lib/python2.6/site-packages']Traceback (most recent call last):File "<string>", line 2, in <module>ImportError: No module named purestorage