# ansible k8s module to support syntax for creating configmap --from-file

**URL:** <https://forum.ansible.com/t/ansible-k8s-module-to-support-syntax-for-creating-configmap-from-file/32317>\
**Category:** Ansible Developer\
**Tags:** kubernetes\
**Created:** [February 24, 2020, 4:17pm UTC](https://forum.ansible.com/t/ansible-k8s-module-to-support-syntax-for-creating-configmap-from-file/32317 "2020-02-24T16:17:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sri\_sadineni](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sri\_sadineni](https://forum.ansible.com/u/sri_sadineni)\
**Post date:** [February 24, 2020, 4:17pm UTC](https://forum.ansible.com/t/ansible-k8s-module-to-support-syntax-for-creating-configmap-from-file/32317/1 "2020-02-24T16:17:41Z")

</div>

Hi Team,

I have looking forward to create config maps by using --from-file syntax. I’m on version 2.7.2 and I couldn’t find any syntax that support this.

This is the command I’ve been trying to automate.  
kubectl create configmap securitypolicy --from-file=securitypolicy.json -n demo.

Could anyone here guide me to create the config map with --from-file syntax using ansible modules?
