diff --git a/tasks/update.yml b/tasks/update.yml index c70e7be..5f23553 100644 --- a/tasks/update.yml +++ b/tasks/update.yml @@ -18,7 +18,7 @@ changed_when: false register: wp_upd_chk -- name: "Update WordPress in {{ path }}" +- name: "Update WordPress in {{ path }}" # noqa no-changed-when command: cmd: "wp --allow-root --path={{ path }} --no-color core update" when: (wp_up_core_str not in wp_upd_chk.stdout) diff --git a/tests/install.yml b/tests/install.yml index da41bf6..26a2f97 100644 --- a/tests/install.yml +++ b/tests/install.yml @@ -20,7 +20,7 @@ pause: seconds: 5 -- name: Install WordPress +- name: Install WordPress # noqa no-changed-when command: cmd: "{{ item }}" loop: diff --git a/tests/main.yml b/tests/main.yml index e19e849..a8078fa 100644 --- a/tests/main.yml +++ b/tests/main.yml @@ -7,6 +7,14 @@ - include_tasks: install.yml + # Initial run, var casting + - include_role: + name: "{{ playbook_dir.split('/')[:-1] | last }}" + vars: + path: /var/www/html/wordpress + update: "true" + + # Idempotency - include_role: name: "{{ playbook_dir.split('/')[:-1] | last }}" vars: