Configuration as code and automation are not the same thing! Configuration as code is just one use case that makes up the broader category of IT infrastructure automation. Ansible is a general purpose IT infrastructure automation platform to help with config as code, and numerous other use cases!
Find hands-on interactive labs here:
https://www.redhat.com/en/interactive...