-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/#111 #112
Fix/#111 #112
Conversation
Signed-off-by: Anis FATHALLAH <anis@fathallah.fr>
Signed-off-by: Anis FATHALLAH <anis@fathallah.fr>
package: | ||
name: "{{ ((hostvars[item]['ansible_os_family'] == 'RedHat') and (hostvars[item]['ansible_distribution_major_version'] == '7')) | ternary('python-psycopg2', 'python3-psycopg2') }}" | ||
with_items: "{{ databases | json_query('*.host') | unique }}" | ||
delegate_to: "{{ item }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be run as a task vs an inventory group. Why not modify cloudera.cluster.infrastructure.rdbms
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix is only useful if cloudera.cluster.infrastructure.rdbms
is not run
psycopg2 is already installed in cloudera.cluster.infrastructure.rdbms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dug into this a bit more; this application pattern is rife throughout this role, for better or worse.
@anisf could you set up your signature verification -- looks like you just need to upload your GPG key to your GH account. Thanks! |
Done ! |
package: | ||
name: "{{ ((hostvars[item]['ansible_os_family'] == 'RedHat') and (hostvars[item]['ansible_distribution_major_version'] == '7')) | ternary('python-psycopg2', 'python3-psycopg2') }}" | ||
with_items: "{{ databases | json_query('*.host') | unique }}" | ||
delegate_to: "{{ item }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dug into this a bit more; this application pattern is rife throughout this role, for better or worse.
Ensure psycopg2 is installed before running ansible modules that depends on it
Fixing #111
On RHEL 7, yum package is
python-psycopg2
On RHEL 8, Ubuntu 18.04 & 20.40, apt package is
python3-psycopg2
At the moment, these are the only OS supported by
cloudera.cluster