geerlingguy/raspberry-pi-dramble

ansible-playbook -i inventory main.yml failing

jdalke opened this issue · 2 comments

Trying to run the playbook and I get the follow when executing pre__tasks (test-setup.yml)

fatal: [192.168.1.221]: FAILED! =>
msg: |-
The conditional check 'deploy_target != 'pi'' failed. The error was: error while evaluating conditional (deploy_target != 'pi'): 'deploy_target' is undefined

The error appears to be in '/home/jdalke/raspberry-pi-dramble/tasks/test-setup.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- name: Ensure auth.log file is present.
  ^ here

Running ansible on Ubuntu 20.04 and Networking and Testing Ansible both work

Closing issue as the deploy_target was suppose to be defined in the 'inventory' file which I accidently deleted.
Once I added the variable back everything worked.