Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure application gateway pfx certificate installation with Ansible #1436

Open
Rinshad opened this issue Apr 30, 2021 · 0 comments
Open

Azure application gateway pfx certificate installation with Ansible #1436

Rinshad opened this issue Apr 30, 2021 · 0 comments

Comments

@Rinshad
Copy link

Rinshad commented Apr 30, 2021

Hello,

I am trying to provision an Azure application gateway using Ansible. But am getting the below error when I try to include a PFX certificate.

fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'file'. Error was a <type 'exceptions.UnicodeDecodeError'>, original message: 'utf8' codec can't decode byte 0x82 in position 1: invalid start byte"}

This is my ansible script

ssl_certificates:
     - data: "{{ lookup('file', './certificate.pfx') }}"
       name: certificate
       password: "xxxxxxxx"

I have tried the following format but no luck

- data: "{{ b64encode (lookup('file', './certificate.pfx'  )) }}"  
- data: "{{ lookup('file', './certificate.pfx') | b64encode }}" 
- data: "{{ lookup('file', './certificate.pfx')  b64encode }}"  
- data: "{{ b64encode | (lookup('file', './certificate.pfx'  )) }}" 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant