Extends variables in yaml

I have a question: How to extends variables:

In group_vars/all, i have a variable config and i want in host_vars/my_server to extend it

How to do that?

Could you give an example of what you want to achieve?I think that would make your question clearer.

Thanks,
Toshio

What about:

Extending a list? In Python-Syntax
group_vars/all.yml: packages = ["a", "b"]
host_vars/host1.yml: packages.extend(["c", "d"])

Endresult for packages for host1: ["a", ""b", "c", "d"]

Is this possible in yaml?

Regards Mirko

ansible is not a programming language, variables are really pretty
static, they can be overwritten but not really modified.

If you want to create a new list that has the contents of 2 other
lists, look at the set theory filters:

with_items: packages|union(extra_packages)

that should give you what you want.