Skip to content

Commit

Permalink
Linter and test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bviktor committed Apr 18, 2023
1 parent 3d85e59 commit 24f6afc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tasks/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
pause:
seconds: 5

- name: Install WordPress
- name: Install WordPress # noqa no-changed-when
command:
cmd: "{{ item }}"
loop:
Expand Down
8 changes: 8 additions & 0 deletions tests/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 24f6afc

Please sign in to comment.