I need to create a default profile for firefox on some of my servers which requires the DISPLAY number. I can't figure out how to do this with Ansible. I've been trying to get X11 forwarding working, but have not been successful. I am not allowed to alter the SSH configuration, so I can't enable X11 from there. How can I do this with Ansible?
I've tried the following:
- name: Create default profile shell: firefox -createprofile "default /opt/profiles/default"and setting the
ssh_argsinansible.cfgto:ssh_args= -XThis fails with:
Failed to connect to the host via ssh: ssh: connect to host as1 port 22: No route to host
- name: Create default profile shell: | export DISPLAY=:0.0 firefox -createprofile "default /opt/profiles/default"without adding the
ssh_args = -X optionThis fails with:
No protocol specified, Error: cannot open display: :0.0
I can ssh -X user@as1 and successfully run: firefox -createprofile "default /opt/profiles/default"
There must be a way to do this, but I'm not sure what else to try.