Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Salt State to remove annoying warning on Amazon Linux. - WARNING - DOES NOT ACTUALLY FIX THE ISSUE. THIS JUST SUPPRESSES THE WARNING.
# TEMP: Disable warnings after installing apache-libcloud
# Try disabling this after future versions of apache-libcloud are released
disable_libgmp_warning:
file.replace:
- name: /usr/lib64/python2.6/site-packages/Crypto/Util/number.py
- pattern: 'if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:'
- repl: '#if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:'
disable_RandomPool_warning_line1:
file.replace:
- name: /usr/lib64/python2.6/site-packages/Crypto/Util/randpool.py
- pattern: 'warnings.warn\("This application uses RandomPool'
- repl: '#warnings.warn\("This application uses RandomPool'
disable_RandomPool_warning_line2:
file.replace:
- name: /usr/lib64/python2.6/site-packages/Crypto/Util/randpool.py
- pattern: 'RandomPool_DeprecationWarning\)'
- repl: '#RandomPool_DeprecationWarning\)'
@UtahDave

This comment has been minimized.

Copy link
Owner Author

UtahDave commented Sep 2, 2014

Place this in /srv/salt/pycrypto.sls

Then run:

salt 'minion-id' state.sls pycrypto

or

salt -G 'os:Amazon' state.sls pycrypto
@UtahDave

This comment has been minimized.

Copy link
Owner Author

UtahDave commented Sep 2, 2014

Again, this does NOT actually fix the problem being warned about here. Use at your own risk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.