Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

Variable expansion/core.

ANSIBLE VERSION

Tried with both 1.9.x and 2.1.x, but different failures occur (see below for details).

ansible 1.9.6
configured module search path = None

ansible 2.1.0.0
config file =
configured module search path = Default w/o overrides

CONFIGURATION

Only the ANSIBLE_HOSTS to point to correct inventory.

OS / ENVIRONMENT

Gentoo 64-bit, Ansible installed via virtualenv, local actions only.

SUMMARY

Nested variables from group_vars are not fully expanded when used in handler names.

STEPS TO REPRODUCE

Create a simple role (useful to allow duplicates for testing) that has single task which triggers a handler that contains variable expansion in its name, for example Handler {{ myvar }}.

Create a group vars file that defines a single variable (not the myvar one).

Run a playbook that invokes the role by passing in the variable value. The value should reference the variable defined in group_vars. For example myvar: "this_is_{{ blah }}".

# ./test.yml
- hosts: localhost
roles:
- role: sample
myvar: "not_nested"
- role: sample
myvar: "nested_with_{{ inlinevar }}"
- role: sample
anothervar: anothervar
myvar: "nested_with_{{ anothervar }}"

# ./hosts
localhost ansible_connection=local

# ./group_vars/all.yml

---

inlinevar: "inline_variable"

# ./roles/sample/meta/main.yml

---

allow_duplicates: yes

# ./roles/sample/tasks/main.yml

---

- debug: msg="Triggering change with myvar set to {{ myvar }}"
changed_when: True
notify:
- "Notify handler {{ myvar }}"

# ./roles/sample/handlers/main.yml

---

- name: "Notify handler {{ myvar }}"
debug: msg="Handler got notified with myvar set to {{ myvar }}"

EXPECTED RESULTS

When handlers are run, all variables, including nested ones, have been fully expanded. Example output would be:

NOTIFIED: [sample | Notify handler nested_with_inline_variable] ***************
ok: [localhost] => {
"msg": "Handler got notified with myvar set to nested_with_inline_variable"
}

ACTUAL RESULTS

With Ansible 1.9.6:

PLAY [localhost] **************************************************************

GATHERING FACTS ***************************************************************
<localhost> REMOTE_MODULE setup
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1466243767.71-214122205397002 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1466243767.71-214122205397002 && echo $HOME/.ansible/tmp/ansible-tmp-1466243767.71-214122205397002']
<localhost> PUT /tmp/tmpSYEsgV TO /home/branko/.ansible/tmp/ansible-tmp-1466243767.71-214122205397002/setup
<localhost> EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/branko/.ansible/tmp/ansible-tmp-1466243767.71-214122205397002/setup; rm -rf /home/branko/.ansible/tmp/ansible-tmp-1466243767.71-214122205397002/ >/dev/null 2>&1']
ok: [localhost]

TASK: [sample | debug msg="Triggering change with myvar set to not_nested"] ***
changed: [localhost] => {
"changed": true,
"msg": "Triggering change with myvar set to not_nested"
}

TASK: [sample | debug msg="Triggering change with myvar set to nested_with_{{ inlinevar }}"] ***
changed: [localhost] => {
"changed": true,
"msg": "Triggering change with myvar set to nested_with_inline_variable"
}

TASK: [sample | debug msg="Triggering change with myvar set to nested_with_anothervar"] ***
changed: [localhost] => {
"changed": true,
"msg": "Triggering change with myvar set to nested_with_anothervar"
}

NOTIFIED: [sample | Notify handler not_nested] ********************************
ok: [localhost] => {
"msg": "Handler got notified with myvar set to not_nested"
}

NOTIFIED: [sample | Notify handler nested_with_{{ inlinevar }}] ***************
ok: [localhost] => {
"msg": "Handler got notified with myvar set to nested_with_inline_variable"
}

NOTIFIED: [sample | Notify handler nested_with_anothervar] ********************
ok: [localhost] => {
"msg": "Handler got notified with myvar set to nested_with_anothervar"
}

PLAY RECAP ********************************************************************
localhost : ok=7 changed=3 unreachable=0 failed=0

With Ansible 2.1.0 (notice that the handler is not executed at all):

No config file found; using defaults
Loaded callback default of type stdout, v2.0

PLAYBOOK: test.yml *************************************************************
1 plays in test.yml

PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: branko
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1466243803.88-148745907678470 `" && echo ansible-tmp-1466243803.88-148745907678470="` echo $HOME/.ansible/tmp/ansible-tmp-1466243803.88-148745907678470 `" ) && sleep 0'
<localhost> PUT /tmp/tmp_w1mcm TO /home/branko/.ansible/tmp/ansible-tmp-1466243803.88-148745907678470/setup
<localhost> EXEC /bin/sh -c 'LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_MESSAGES=en_US.utf8 /usr/bin/python /home/branko/.ansible/tmp/ansible-tmp-1466243803.88-148745907678470/setup; rm -rf "/home/branko/.ansible/tmp/ansible-tmp-1466243803.88-148745907678470/" > /dev/null 2>&1 && sleep 0'
ok: [localhost]

TASK [sample : debug] **********************************************************
task path: /home/branko/projects/anstest/roles/sample/tasks/main.yml:3
NOTIFIED HANDLER Notify handler not_nested
ok: [localhost] => {
"msg": "Triggering change with myvar set to not_nested"
}

TASK [sample : debug] **********************************************************
task path: /home/branko/projects/anstest/roles/sample/tasks/main.yml:3
NOTIFIED HANDLER Notify handler nested_with_inline_variable
ok: [localhost] => {
"msg": "Triggering change with myvar set to nested_with_inline_variable"
}

TASK [sample : debug] **********************************************************
task path: /home/branko/projects/anstest/roles/sample/tasks/main.yml:3
NOTIFIED HANDLER Notify handler nested_with_anothervar
ok: [localhost] => {
"msg": "Triggering change with myvar set to nested_with_anothervar"
}

RUNNING HANDLER [sample : Notify handler not_nested] ***************************
ok: [localhost] => {
"msg": "Handler got notified with myvar set to not_nested"
}

RUNNING HANDLER [sample : Notify handler nested_with_anothervar] ***************
ok: [localhost] => {
"msg": "Handler got notified with myvar set to nested_with_anothervar"
}

PLAY RECAP *********************************************************************
localhost : ok=6 changed=3 unreachable=0 failed=0

Issue 2:
Split changelog into file per release, it is getting unwieldy, also it would be nice to create ToC and sunset the RELEASES.txt as it is mostly duplicate information.

ISSUE TYPE

Feature Idea

Documentation Report

COMPONENT NAME

changelog

ANSIBLE VERSION

2.5