# Self Sign certificate – Generate and OpenSSL certificates based on existing Root ca

**URL:** <https://forum.ansible.com/t/self-sign-certificate-generate-and-openssl-certificates-based-on-existing-root-ca/35725>\
**Category:** Ansible Project\
**Created:** [September 12, 2021, 8:58am UTC](https://forum.ansible.com/t/self-sign-certificate-generate-and-openssl-certificates-based-on-existing-root-ca/35725 "2021-09-12T08:58:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adir](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Adir](https://forum.ansible.com/u/Adir)\
**Post date:** [September 12, 2021, 8:58am UTC](https://forum.ansible.com/t/self-sign-certificate-generate-and-openssl-certificates-based-on-existing-root-ca/35725/1 "2021-09-12T08:58:29Z")

</div>

Hi,  
I need to generate self sign certificate based on existing Root CA.  
How can i do this?  
i noticed below module → **x509\_certificate – Generate and/or check OpenSSL certificates**  
But i didn’t understand how can i generate ssl certificate based on existing root cert ??

Thanks !!

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [September 12, 2021, 10:15am UTC](https://forum.ansible.com/t/self-sign-certificate-generate-and-openssl-certificates-based-on-existing-root-ca/35725/2 "2021-09-12T10:15:48Z")

</div>

> Hi,  
> I need to generate self sign certificate based on existing Root CA.

This doesn’t make sense.  
It’s either a self signed certificate, or a certificate that is signed by a CA.

So, what do you mean?

---

<div class="post-metadata">

**Author:** ![Adir](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Adir](https://forum.ansible.com/u/Adir)\
**Post date:** [September 12, 2021, 11:06am UTC](https://forum.ansible.com/t/self-sign-certificate-generate-and-openssl-certificates-based-on-existing-root-ca/35725/3 "2021-09-12T11:06:54Z")

</div>

a certificate that is signed by a CA that already exist (including ca.key and ca.crt)…

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [September 13, 2021, 12:29pm UTC](https://forum.ansible.com/t/self-sign-certificate-generate-and-openssl-certificates-based-on-existing-root-ca/35725/4 "2021-09-13T12:29:33Z")

</div>

Check the second example at the bottom of  
[https://docs.ansible.com/ansible/latest/collections/community/crypto/x509\_certificate\_module.html](https://docs.ansible.com/ansible/latest/collections/community/crypto/x509_certificate_module.html)
