# Proxy SG (Blue Coat) enable mode

**URL:** <https://forum.ansible.com/t/proxy-sg-blue-coat-enable-mode/37490>\
**Category:** Ansible Project\
**Created:** [December 22, 2022, 1:18pm UTC](https://forum.ansible.com/t/proxy-sg-blue-coat-enable-mode/37490 "2022-12-22T13:18:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vicente\_Dominguez](https://avatars.discourse-cdn.com/v4/letter/v/bbe5ce/32.png) [@Vicente\_Dominguez](https://forum.ansible.com/u/Vicente_Dominguez)\
**Post date:** [December 22, 2022, 1:18pm UTC](https://forum.ansible.com/t/proxy-sg-blue-coat-enable-mode/37490/1 "2022-12-22T13:18:41Z")

</div>

Dear all,

Does anybody know how to perform the privilege escalation to “enable” in Proxy SG via Ansible?

I have tried the following code, with no luck:

**\*\*\*OS = JUNOS because I could not find SG OS and somebody told us to use “junos” instead. It works to launch regular commands but It does not work to escalate to “enable”.**

- hosts: bluecoat  
gather\_facts: no  
connection: local  
vars:  
ansible\_connection: network\_cli  
ansible\_user: “{{ lookup(‘env’, ‘ANSIBLE\_NET\_USERNAME’) }}”  
ansible\_password: “{{ lookup(‘env’, ‘ANSIBLE\_NET\_PASSWORD’) }}”  
ansible\_port: 22  
ansible\_network\_os: junos  
tasks:

- name: Show SSL Keyring  
cli\_command:  
command: “show ssl keyring”

#### prompt: “Password:”

#### answer: “{{ lookup(‘env’, ‘ANSIBLE\_NET\_PASSWORD’) }}”

vars:  
ansible\_become: yes  
ansible\_become\_method: enable  
ansible\_become\_password: “{{ lookup(‘env’, ‘ANSIBLE\_NET\_PASSWORD’) }}”  
register: ssl\_keyring

**Error:** It says “invalid input” because the command only works in enable mode, so the escalation did not work.

{  
“changed”: false,  
“stdout”: “^\n% Invalid input detected at ‘^’ marker.”,  
“invocation”: {  
“module\_args”: {  
“command”: “show ssl keyring”,  
“newline”: true,  
“sendonly”: false,  
“check\_all”: false,  
“prompt”: null,  
“answer”: null  
}  
},  
“stdout\_lines”: [  
“^”,  
“% Invalid input detected at ‘^’ marker.”  
],  
“\_ansible\_no\_log”: false  
}

Thank you very much in advance. Your help is really really appreciated.

Regards,  
Vicente.

---

<div class="post-metadata">

**Author:** ![Konpal\_Maharwal](https://avatars.discourse-cdn.com/v4/letter/k/c5a1d2/32.png) [@Konpal\_Maharwal](https://forum.ansible.com/u/Konpal_Maharwal)\
**Post date:** [March 8, 2023, 12:26pm UTC](https://forum.ansible.com/t/proxy-sg-blue-coat-enable-mode/37490/2 "2023-03-08T12:26:56Z")

</div>

Hi All,

I am facing similar issues with the enable mode, wondering if we were able to find a solution to this.

Thank you very much in advance. Your help is really really appreciated.

Regards,  
Konpal Maharwal

---

<div class="post-metadata">

**Author:** ![Peter\_Howes](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Peter\_Howes](https://forum.ansible.com/u/Peter_Howes)\
**Post date:** [March 23, 2023, 1:03pm UTC](https://forum.ansible.com/t/proxy-sg-blue-coat-enable-mode/37490/3 "2023-03-23T13:03:25Z")

</div>

Hi all,

I don’t think the problem is with enable, you also need to also pass the commend “config t” to enter the config terminal mode in SGOS and then enter the right sub menu, something like this:

# **enable**

# **config t**

#(config) **ssl**  
#(config ssl) show ssl keyring  
See the CLI example here: [Renew appliance certificate on the Edge Secure Web Gateway (formerly ProxySG)](https://knowledge.broadcom.com/external/article/168179/renew-the-proxysg-appliance-certificate.html)

HTH  
Peter
