# Need help in using set\_fact , playbook runs fine , facts not set , no errors

**URL:** <https://forum.ansible.com/t/need-help-in-using-set-fact-playbook-runs-fine-facts-not-set-no-errors/16822>\
**Category:** Ansible Project\
**Created:** [November 19, 2014, 10:25am UTC](https://forum.ansible.com/t/need-help-in-using-set-fact-playbook-runs-fine-facts-not-set-no-errors/16822 "2014-11-19T10:25:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Roelofs](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Marc\_Roelofs](https://forum.ansible.com/u/Marc_Roelofs)\
**Post date:** [November 19, 2014, 10:25am UTC](https://forum.ansible.com/t/need-help-in-using-set-fact-playbook-runs-fine-facts-not-set-no-errors/16822/1 "2014-11-19T10:25:36Z")

</div>

Hi Group,

I am trying to add some basic facts to a system but nothing seems to work.  
My goal is to add a simple fact like the type of the server and the main application running on it to be set  
Type of server can be webserver (apache/tomcat)/ database server (mysql/postgress … etc)  
And I would like to do this from the commandline with -e at initial deployment of a server.

My main.yml looks like this

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [November 19, 2014, 3:30pm UTC](https://forum.ansible.com/t/need-help-in-using-set-fact-playbook-runs-fine-facts-not-set-no-errors/16822/2 "2014-11-19T15:30:59Z")

</div>

First, set\_fact is ephemeral (only lasts for the current ansible run), your first 2 attempts were succeeding, to see the results you can run:

- debug: msg=“systemtype:{{system\_type}}”

second, the - denotes a task, so - name + - action doen’t work, name is a property of the task and has to be in the same grouping.

- name:  
action:

or

- action:  
name:
