Let us build an instance of MySQL using Ansible and gcloud:
- We will start by configuring the gcloud tool. In order to keep our main.yml clean, we will move the gcloud configuration tasks into a different YAML file, configure_gcloud.yml, and import it in main.yml. In this YAML file, we have Ansible tasks to take care of installing the Google SDK repository on various Linux distributions, including Red Hat Enterprise Linux, CentOS, Fedora, Debian, and Ubuntu. These need super user privileges. We have included the repository files in the code base. Our configure_gcloud.yml would look like this:
---- name: enable Google SDK repo for RedHat/Centos copy: src: google-cloud-sdk.repo dest: /etc/yum.repos.d/google-cloud-sdk.repo ...