---
- name: Install unzip for Ansible unarchive command
  yum:
    name: unzip
    state: latest

- name: Download wordpress
  unarchive:
    src: https://wordpress.org/latest.zip
    dest: /usr/local/imicrobe/
    remote_src: True

- name: Copy wp-config.php
  copy:
    src: files/wp-config.php
    dest: /usr/local/imicrobe/wordpress/

---
- name: Install unzip for Ansible unarchive command
  yum:
    name: unzip
    state: latest

- name: Download wordpress
  unarchive:
    src: https://wordpress.org/latest.zip
    dest: /home/imicrobe/imicrobe/
    remote_src: True
  become_user: imicrobe

- name: Copy wp-config.php
  copy:
    src: files/wp-config.php
    dest: /home/imicrobe/imicrobe/wordpress/
  become_user: imicrobe
Install wordpress in the imicrobe home directory
Install wordpress in the imicrobe home directory
