You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/old_style_cache_plugins/cleanup.yml

42 lines
861 B
YAML

---
- hosts: localhost
gather_facts: no
ignore_errors: yes
tasks:
- command: redis-cli keys
- name: delete cache keys
command: redis-cli del {{ item }}
loop:
- ansible_facts_localhost
- ansible_inventory_localhost
- ansible_cache_keys
- name: shutdown the server
command: redis-cli shutdown
- name: cleanup set up files
file:
path: "{{ item }}"
state: absent
loop:
- redis-stable.tar.gz
- name: remove executables
file:
state: absent
path: "/usr/local/bin/{{ item }}"
follow: no
become: yes
loop:
- redis-server
- redis-cli
- name: clean the rest of the files
file:
path: "{{ item }}"
state: absent
loop:
- ./redis-stable.tar.gz
- ./redis-stable