Ubuntu1804-CIS icon indicating copy to clipboard operation
Ubuntu1804-CIS copied to clipboard

Error! The field ‘hosts’ is required but not set

Open tjapak opened this issue 1 month ago • 1 comments

Describe the bug I get this error as soon as I run the playbook about hosts is required but not set.

To Reproduce Steps to reproduce the behavior: Sudo ansible-playbook harden.yml (my replacement for site.yml) Expected behavior No errors.

Software (please complete the following information):

  • Ansible Version: 2.9.27

Additional context I was getting same error on the 2.9.5 after commenting out collections which was causing another issue. To fix that error and upgrade of ansible was recommended. Did the following: First, remove the default version supplied by the official Ubuntu repos, run commands: sudo apt remove ansible sudo apt --purge autoremove Update Ubuntu repo and apply all pending patches: sudo apt update sudo apt upgrade Install software-properties-common package on Ubuntu to enable PPA support, run: sudo apt -y install software-properties-common sudo apt-add-repository ppa:ansible/ansible Finally, install the latest version of Ansible on Ubuntu Linux using the apt: sudo apt install ansible

tjapak avatar Dec 30 '24 17:12 tjapak