# Use rax module to create a server with extra\_create\_args / build\_config

**URL:** <https://forum.ansible.com/t/use-rax-module-to-create-a-server-with-extra-create-args-build-config/17973>\
**Category:** Ansible Project\
**Created:** [April 14, 2015, 10:45am UTC](https://forum.ansible.com/t/use-rax-module-to-create-a-server-with-extra-create-args-build-config/17973 "2015-04-14T10:45:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danrough](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/danrough/32/3541_2.png) [@danrough](https://forum.ansible.com/u/danrough)\
**Post date:** [April 14, 2015, 10:45am UTC](https://forum.ansible.com/t/use-rax-module-to-create-a-server-with-extra-create-args-build-config/17973/1 "2015-04-14T10:45:26Z")

</div>

Hello,

I’d like to be able to create servers at Rackspace which are free from any packages other than the ones installed by default as part of a Debian installation. In response to the support ticket I raised, I was pointed to this article in Rackspace’s documentation: [http://www.rackspace.com/knowledge\_center/article/post-build-options-for-servers](http://www.rackspace.com/knowledge_center/article/post-build-options-for-servers).

The section “Build options for configuration management software (Chef, Puppet, Ansible, Salt)” in that article suggests to achieve the above, I need to provide additional information via the build\_config parameter:

```auto
--meta build_config=core

```

I assumed that using the rax module, I could use the extra\_create\_args attribute to supply this information. I’ve tested that, and I haven’t been able to get it working. I’ve copied my code below, I’d like to know whether I’m not using the module correctly, or if I’ve discovered a problem in the implementation (the docs suggest extra\_create\_args has only recently been added):

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 15, 2015, 4:44pm UTC](https://forum.ansible.com/t/use-rax-module-to-create-a-server-with-extra-create-args-build-config/17973/2 "2015-04-15T16:44:01Z")

</div>

Per that article, it looks like you need to add metadata and not options to extra\_create\_args. extra\_create\_args are passed to the novaclient create method.

Something like:

- name: 1 GB General Purpose v1  
local\_action:  
module: rax

[snip]  
meta:  
build\_config: “core,monitoring”

---

<div class="post-metadata">

**Author:** ![Philip\_Schwartz](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@Philip\_Schwartz](https://forum.ansible.com/u/Philip_Schwartz)\
**Post date:** [April 15, 2015, 4:48pm UTC](https://forum.ansible.com/t/use-rax-module-to-create-a-server-with-extra-create-args-build-config/17973/3 "2015-04-15T16:48:36Z")

</div>

Matt is correct with his comment.

As long as you set the var in the meta section of the call to the Rax module it will be set in the request to the Cloud Servers API to create the instance.

---

<div class="post-metadata">

**Author:** ![danrough](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/danrough/32/3541_2.png) [@danrough](https://forum.ansible.com/u/danrough)\
**Post date:** [April 15, 2015, 4:59pm UTC](https://forum.ansible.com/t/use-rax-module-to-create-a-server-with-extra-create-args-build-config/17973/4 "2015-04-15T16:59:17Z")

</div>

Thanks both - I had thought of using the meta attribute instead but hadn’t got round to testing it. Good to know that’s where I should be heading.
