WordPress

As you may have already guessed, this role, which can be found in the roles/stack/tasks/wordpress.yml file alongside roles/stack/tasks/main.yml and roles/stack/tasks/deploy.yml, installs and configures WordPress.

Before we progress with the tasks, we need to find out information about our RDS instance:

- name: find some information on the rds instance  local_action:    module: rds    region: "{{ ec2_region }}"    command: facts    instance_name: "{{ environment_name }}-rds"  become: no  register: rds_results

This is so that we can use the tasks when defining the database connection; likewise, we also need to find out about the Elastic Load Balancer:

- name: find some information on the elastic load balancer  local_action: module: elb_application_lb_facts ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.