Ansible Password-less sudo

It gets tricky when you have to escalate an user and the machine doesn’t require a password as such. ‘become’, ‘become_pass’ or anything does not work. You might encounter this error :

“Timeout (62s) waiting for privilege escalation prompt:”

in those cases try using :

sudo: yes

And dont club it with anything else. Hope it works !

Advertisements

Webdriver Marionette Driver

In Firefox version 47 and above, with selenium webdriver 2.53.x you would be typically facing “could not start a new session” error with firefox crashing down.

Starting FF 47 even firefox is moving in the direction of chrome, where they have created a all new executable driver – Marionette.

The setup is pretty straight forward. While you usually do –

WebDriver driver = new FirefoxDriver();

Replace it with its own driver class.

WebDriver driver = new MarionetteDriver();

Thats for the driver object creation part of it. Download the driver from here. Unzip and provide the location to the executable to the system property you are going to set in you framework (code).

System.setProperty("webdriver.gecko.driver", "/path/to/geckodriver");

Ok One last thing you need to do is, make it executable. Without it, it wont work. In windows this wont be an issue at all. In Linux based machines you have to to this from a command line, from the place were you have unzipped it.

chmod +x geckodriver-XXXXX

Thats it you are good to go. You dont have to set any specific capabilities or anything as such.