On 06.04.2019 07:03, Lucas Possamai wrote:
So.. doing some tests.
Playbook is as follow:
---
- name: Oracle Database Snapshots
hosts: dbservers
remote_user: oracle
sudo: true
sudo_user: root
vars_files:
- vars/arrays.yaml
- vars/database.yaml
tasks:
# Take Snapshot of database volumes
- include: tasks/take_snapshot.yaml
run_once: yes
tasks/take_snapshot.yaml:
---
# Perform PURE Flasharray Database snapshots
- name: perform PURE volume snapshot
purefa_snap:
name: db2-prod-oracledb
suffix: snap
fa_url: "{{ fa_url }}"
api_token: "{{ apiToken }}"
Now, if I replace "*hosts: dbservers*" for "*hosts: localhost*", it
works.
So that means it was indeed trying to connect to "*dbservers*" and then
running the commands.
As I explained to you in a previous mail :-)
This is how must modules work, they run on remote host unless hosts:
localhost, connection: local or delegate_to: localhost is set somewhere.
I did check the dbservers host and I can see purestorage sdk is also
installed there.
oracle[DR]@db2:~$pip freeze |grep purestorage
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.
purestorage==1.16.0
How can I fix the missing purestorage sdk error? It is an RHEL 6.7.
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.
--
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-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/08c85a3d95a883efed26dda97ea0bff4%40olstad.com.
For more options, visit https://groups.google.com/d/optout.