# Hello, I'm starting with Ansible and I have a question about the Playbook

**URL:** <https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702>\
**Category:** Ansible Project\
**Created:** [October 1, 2018, 8:12pm UTC](https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702 "2018-10-01T20:12:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinicius\_Barreto](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@Vinicius\_Barreto](https://forum.ansible.com/u/Vinicius_Barreto)\
**Post date:** [October 1, 2018, 8:12pm UTC](https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702/1 "2018-10-01T20:12:53Z")

</div>

Hello, I’m starting with Ansible and I have a question about the Playbook:

Assuming that I create a configuration deployment / update recipe for the [web servers] group, and put it on the new “clean” server in this group and run this Playbook, Ansible will be able to detect that the old servers have already received the current configuration and it will igorará them, and in this way will execute the current configuration only in the new servers or Ansible would execute this Playbook in all the servers of the group, memso in those that already received this current configuration?

Thanks to all who can help!

---

<div class="post-metadata">

**Author:** ![Vinicius\_Barreto](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@Vinicius\_Barreto](https://forum.ansible.com/u/Vinicius_Barreto)\
**Post date:** [October 1, 2018, 8:14pm UTC](https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702/2 "2018-10-01T20:14:49Z")

</div>

ansible version: 1.7.2

---

<div class="post-metadata">

**Author:** ![Fabio\_Gomes\_Sakiyama](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fabio\_Gomes\_Sakiyama](https://forum.ansible.com/u/Fabio_Gomes_Sakiyama)\
**Post date:** [October 1, 2018, 8:38pm UTC](https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702/3 "2018-10-01T20:38:42Z")

</div>

Hi Vinícius,

Im pretty sure ansible wont work as you expect. He works in an imperative way rather than declarative, like puppet for example. You will have to manually check if the server should or not be updated, since ansible doesnt natively stores states.

Hope It clarifies you.

---

<div class="post-metadata">

**Author:** ![Vinicius\_Barreto](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@Vinicius\_Barreto](https://forum.ansible.com/u/Vinicius_Barreto)\
**Post date:** [October 1, 2018, 8:42pm UTC](https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702/4 "2018-10-01T20:42:51Z")

</div>

Hello Fabio, I understand. Thank you very much for your reply.

---

<div class="post-metadata">

**Author:** ![Fabio\_Gomes\_Sakiyama](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fabio\_Gomes\_Sakiyama](https://forum.ansible.com/u/Fabio_Gomes_Sakiyama)\
**Post date:** [October 1, 2018, 8:45pm UTC](https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702/5 "2018-10-01T20:45:10Z")

</div>

Sorry, I Think I misread your question.

If youre talking about changing ansible hosts, adding a New server inside a group, ansible Will rerun tour playbook on all hosts, but he also detect If a task should run or not. When the result is a Green “ok”, It means It didnt changed anything. So It Will probably work as you expect.

---

<div class="post-metadata">

**Author:** ![Everson\_Leal](https://avatars.discourse-cdn.com/v4/letter/e/82dd89/32.png) [@Everson\_Leal](https://forum.ansible.com/u/Everson_Leal)\
**Post date:** [October 1, 2018, 8:58pm UTC](https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702/6 "2018-10-01T20:58:59Z")

</div>

Just pay attention on shell, raw or command tasks, it's just runs and command on the server and can't check if it was ran before, see the changed\_when clause: [https://docs.ansible.com/ansible/2.6/user\_guide/playbooks\_error\_handling.html#overriding-the-changed-result](https://docs.ansible.com/ansible/2.6/user_guide/playbooks_error_handling.html#overriding-the-changed-result)

---

<div class="post-metadata">

**Author:** ![Vinicius\_Barreto](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@Vinicius\_Barreto](https://forum.ansible.com/u/Vinicius_Barreto)\
**Post date:** [October 1, 2018, 9:00pm UTC](https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702/7 "2018-10-01T21:00:18Z")

</div>

Thank you very much Fabio!

---

<div class="post-metadata">

**Author:** ![Vinicius\_Barreto](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@Vinicius\_Barreto](https://forum.ansible.com/u/Vinicius_Barreto)\
**Post date:** [October 1, 2018, 9:01pm UTC](https://forum.ansible.com/t/hello-im-starting-with-ansible-and-i-have-a-question-about-the-playbook/28702/8 "2018-10-01T21:01:02Z")

</div>

Hello Everson, thank you very much!
