Tower: What is causing "[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details"

Viewed 12022

I am just starting to work with Ansible Tower and made a project and then a job template under that project that uses a small initial test playbook (Test.yml):

---
- hosts: east01.xxxxx.com
  become: yes
  become_method: sudo

  tasks:
  - name: test
    shell: echo 'line one line two line three' >> /tmp/abcdef.txt

and, when I try to run that playbook by clicking the "rocketship" in Tower, it looks like it is working:

Identity added: /tmp/awx_35003_yehjodc1/artifacts/35003/ssh_key_data (/tmp/awx_35003_yehjodc1    /artifacts/35003/ssh_key_data)
[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
PLAY [east01.xxxxx.com] **********************************************
TASK [Gathering Facts] *********************************************************
ok: [east01.xxxxx.com]
TASK [test] ********************************************************************
changed: [east01.xxxxx.com]
PLAY RECAP *********************************************************************
east01.xxxxx.com : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0 

and it looks like that is actually working (I can see the file on the target machine being modified when I run the playbook), but can someone tell me what is causing that WARNING:

[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details

??

Also the warning says to "use -vvvv" and I was wondering where/how do I do that (since I am running this playbook under Tower)?

Thanks! Jim

EDIT: I just did a test, where I ran the same yaml file using ansible-playbook (command line) and it ran without that warning, so I guess that the warning is something to do with some difference between ansible-playbook and Tower?

2 Answers

Your version of ansible-playbook is probably older than the version of Ansible being used in Tower.

In recent versions of Ansible, group names must be valid variable names. See the docs for details on what constitutes a valid variable name.

If east01.xxxxx.com is a group name, the periods are the problem. Otherwise, check you group names for anything not a letter, digit, or _.

This warning appears when you are using dashes in your inventory file when you declaring your group names. For instance if your inventory file looks like this:

[web-servers]
ubuntu ansible_ssh_host=xxx.xxx.xxx.xxx

Ansible will throw that warning. Instead, if you will be using underscores, the warning is gone.

[web_servers]
ubuntu ansible_ssh_host=xxx.xxx.xxx.xxx
Related