#7342 AnsibleUndefinedVariable: 'FedoraCycleNumber'
Closed: Fixed 5 years ago Opened 5 years ago by bowlofeggs.

  • Describe what you need us to do:
    I am unable to run Bodhi's upgrade playbook:
[bowlofeggs@batcave01 ansible][PROD] 🎩︎ sudo rbac-playbook manual/upgrade/bodhi.yml -l bodhi-backend01.phx2.fedoraproject.org
<snip>
TASK [bodhi2/backend : setup basic /etc/bodhi/ contents] **********************************************************************************************************************************************************
Wednesday 31 October 2018  21:28:58 +0000 (0:00:00.041)       0:02:24.740 ***** 
fatal: [bodhi-backend01.phx2.fedoraproject.org]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'FedoraCycleNumber' is undefined"}

PLAY RECAP ********************************************************************************************************************************************************************************************************
bodhi-backend01.phx2.fedoraproject.org : ok=45   changed=6    unreachable=0    failed=1

Does rbac-playbook not load the variables in vars/all/00-FedoraCycleNumber.yaml or something? I'm not sure how to debug this further on my own since I don't have ACLs to run the playbook directly.

  • When do you need this? (YYYY/MM/DD)
    ASAP

  • When is this no longer needed or useful? (YYYY/MM/DD)
    When bodhi is upgraded.

  • If we cannot complete your request, what is the impact?
    Bodhi is now partially upgraded, which is not a good state to be in. I am marking this as urgent due to that.


OK, progress, but a new error ☺

ERROR! 'include_vars' is not a valid attribute for a Play

The error appears to have been in '/srv/web/infra/ansible/playbooks/manual/upgrade/bodhi.yml': line 1, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
  ^ here

Pretty similar error:

EXECV: /usr/bin/sudo -i /bin/bash -i -c cd /srv/web/infra/ansible ; /usr/bin/python2 /usr/bin/ansible-playbook /srv/web/infra/ansible/playbooks/manual/upgrade/bodhi.yml -l bodhi-backend01.phx2.fedoraproject.org:bodhi-backend02.phx2.fedoraproject.org
ERROR! 'include_vars' is not a valid attribute for a Play

The error appears to have been in '/srv/web/infra/ansible/playbooks/manual/upgrade/bodhi.yml': line 1, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: check to see if a mash is going on before we do anything...
  ^ here

I was able to get the playbooks to run thanks to @kevin!

:two_hearts:

Metadata Update from @bowlofeggs:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Log in to comment on this ticket.

Metadata