Using Ansible with Alibaba/Alicloud modules - module

I am relatively new to Ansible, and completely new to Alicloud. I am trying to figure out how I can use the list of modules found here: http://47.88.222.42:8080/ansible-alicloud/latest/modules/list_of_cloud_modules.html, or if there is, in fact, a way to do it.
Officially, it seems, Ansible supports only two modules of Alicloud (found here: https://docs.ansible.com/ansible/2.9/modules/list_of_cloud_modules.html), but the other modules I've seen on several websites before as part of tutorials, so I assume they are meant to be working. Can someone help me with this? I was specifically looking at this module: http://47.88.222.42:8080/ansible-alicloud/latest/modules/ali_vpc_module.html#ali-vpc-module
My current issue with it is that when running the playbook with the module, it gives me the error
ERROR! couldn't resolve module/action 'ali_vpc'. This often indicates a misspelling, missing collection, or incorrect module path.
Any help is appreciated.
Thanks in advance!

You need to install the modules by doing pip install ansible-alicloud.
Then you will be able to get the ali_vpc module from /home/cheshi/.local/lib/python3.8/site-packages/ansible/modules/cloud/alicloud/ali_vpc.py
https://pypi.org/project/ansible-alicloud/

Related

Not able to add implementation 'com.google.android.libraries.places:places:2.2.0'

I am trying to add Places SDK for android.
I am following the following documentation
https://developers.google.com/places/android-sdk/start and
https://developers.google.com/places/android-sdk/client-migration
Unfortunately i am not able to add dependency "implementation 'com.google.android.libraries.places:places:2.2.0'"
I have gone through following links. But no use. Please help me with this.
Failed to resolve: com.google.android.libraries.places:1.0.0:
Google's new Places Library ( implementation 'com.google.android.libraries.places:1.0.0') not resolving
Finally i found solution to my issue.
I solved it by installing the compatibility library.
Followed this. https://developers.google.com/places/android-sdk/client-migration
Following two steps resolved my issue.
Copy the contents of places_compat_compatify.sh, and save as a file to your local computer.
Use the following command to run the compatibility script
./places_compat_compatify.sh 2.1.0
After this, I could run my project successfully and could Place API.
Thanks

ModuleNotFoundError: No module named 'telegram'

Trying to run the python-telegram-bot library through Jupyter Notebook I get this question error. I tried many ways to reinstall it, but nothing from answers at any forums helped me. What should be a mistake and how to avoid it while installing?
Do you have a directory with "telegram" name? If you do,rename your directory and try it again to prevent import conflict.
good luck:)

Can modules be hotpatched?

I want to be able to hotpatch modules while the program is running for a project I'm working on. I tried this, but it doesn't work:
qx[rm -r .precomp/*];
try require PSBot;
try PSBot.test;
Is it possible to do? If so, how can I do it?
No, they can't. CompUnits, compilation units or installed modules are immutable. You cannot unload a module to load it again, which is what you mean by hotfix.

Device Driver, Cannot Remove rmmod: ERROR: module is in use

In attempts to remove a driver (simple_char_driver).., by running
sudo rmmmod simple_char_driver
I receive the following error.
rmmod: ERROR: Module simple_char_driver is in use
After running lsmod... it shows that its already in use by (2)
Module Size Used by
helloModule 16384 0
simple_char_driver 16384 2
I would like to remove this module.
Ive looked online and no solution helps remotely!
I need help! Thank you!
You can use rmmod -f to force the removal. But this is unsafe and can damage other things.
You can use it only if you are sure you module is isolated.
For more info, please read here.

casperjs.bat on windows fails with cannot find module cli.js error

I'm trying out casperJS to run some automated tests. On windows. I followed this installation guide but am stuck.
when I try to run a simple test from the command line like this:
casperjs.bat smoketest.js
I get the following error:
Error: Cannot find module 'C:/code/base/main/Shared/casperjs\modules\cli.js'
I checked, and the file cli.js does exist under the specified path.
I thought the problem could be the mixture of forward and backward slashes in the path, but I edited the bootstrap.js casper code to hard code the path and it made no difference - it still the cannot find module.
I'm have tried this using phantomJS version 1.9.0, and 1.8.2.
Anyone know what I am doing wrong?
Has anyone had success running casper on Windows?
This is due to a bug in PhantomJS 1.9.0 that does not allow for absolute path loading in Windows. Afaik, this should only be apparent if you are using a master build of CasperJS (v1.1).
This bug has been fixed, but is not yet in the Windows binary. You can compile it yourself if you'd like, but that can take quite a bit of time.
I was using the master build of casper. With the latest released version, 1.0.2, it works fine.