|
|
|
@ -17,11 +17,11 @@
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
|
|
|
|
- name: collect any backup files
|
|
|
|
- name: collect any backup files
|
|
|
|
find:
|
|
|
|
find: &backups
|
|
|
|
paths: "{{ role_path }}/backup"
|
|
|
|
paths: "{{ role_path }}/backup"
|
|
|
|
pattern: "{{ inventory_hostname_short }}_config*"
|
|
|
|
pattern: "{{ inventory_hostname_short }}_config*"
|
|
|
|
|
|
|
|
connection: local
|
|
|
|
register: backup_files
|
|
|
|
register: backup_files
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: delete backup files
|
|
|
|
- name: delete backup files
|
|
|
|
file:
|
|
|
|
file:
|
|
|
|
@ -46,11 +46,9 @@
|
|
|
|
- "result.updates is defined"
|
|
|
|
- "result.updates is defined"
|
|
|
|
|
|
|
|
|
|
|
|
- name: collect any backup files
|
|
|
|
- name: collect any backup files
|
|
|
|
find:
|
|
|
|
find: *backups
|
|
|
|
paths: "{{ role_path }}/backup"
|
|
|
|
connection: local
|
|
|
|
pattern: "{{ inventory_hostname_short }}_config*"
|
|
|
|
|
|
|
|
register: backup_files
|
|
|
|
register: backup_files
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
|