Transform both values of a task name into a byte str prior to comparing

Fixes #9571
This commit is contained in:
Toshio Kuratomi 2014-11-19 11:50:02 -08:00
commit c4c3cc315d
4 changed files with 32 additions and 3 deletions

View file

@ -34,13 +34,12 @@ includes:
unicode:
ansible-playbook unicode.yml -i $(INVENTORY) -e @$(VARS_FILE) -v $(TEST_FLAGS)
# Test the start-at-task flag #9571
ansible-playbook unicode.yml -i $(INVENTORY) -e @$(VARS_FILE) -v --start-at-task '*¶' -e 'start_at_task=True' $(TEST_FLAGS)
non_destructive:
ansible-playbook non_destructive.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) -v $(TEST_FLAGS)
mine:
ansible-playbook mine.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) -v $(TEST_FLAGS)
destructive:
ansible-playbook destructive.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) -v $(TEST_FLAGS)

View file

@ -41,3 +41,20 @@
tasks:
- debug: msg='Unicode is a good thing ™'
- debug: msg=АБВГД
# Run this test by adding to the CLI: -e start_at_task=True --start-at-task '*¶'
- name: 'Show that we can skip to unicode named tasks'
hosts: localhost
gather_facts: false
vars:
flag: 'original'
start_at_task: False
tasks:
- name: 'Override flag var'
set_fact: flag='new'
- name: 'A unicode task at the end of the playbook: ¶'
assert:
that:
- 'flag == "original"'
when: start_at_task|bool