Ansible can be used for both CI and CD. It can be used to automate the deployment and configuration of software as part of a CI/CD pipeline.