mirror of
https://github.com/neondatabase/neon.git
synced 2026-07-13 17:10:39 +00:00
playbook to remove tlis from safekeepers
This commit is contained in:
@@ -4,6 +4,8 @@ localhost_warning = False
|
||||
host_key_checking = False
|
||||
timeout = 30
|
||||
|
||||
allow_world_readable_tmpfiles=true
|
||||
|
||||
[ssh_connection]
|
||||
ssh_args = -F ./ansible.ssh.cfg
|
||||
# teleport doesn't support sftp yet https://github.com/gravitational/teleport/issues/7127
|
||||
|
||||
34
.circleci/ansible/cleanup_tlis.yml
Normal file
34
.circleci/ansible/cleanup_tlis.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
- name: cleanup timelines
|
||||
hosts: safekeepers
|
||||
gather_facts: False
|
||||
remote_user: admin
|
||||
tasks:
|
||||
- name: install pip
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- python3-pip
|
||||
- acl
|
||||
become: True
|
||||
|
||||
- name: install psycopg2
|
||||
ansible.builtin.pip:
|
||||
name: psycopg2
|
||||
become_user: safekeeper
|
||||
become: True
|
||||
|
||||
- name: upload script
|
||||
ansible.builtin.copy:
|
||||
src: /home/ars/zenith/cloud/ops/ad_hoc/clean_timelines.py
|
||||
dest: clean_timelines.py
|
||||
tags:
|
||||
- safekeeper
|
||||
|
||||
- name: run script
|
||||
ansible.builtin.command: python3 clean_timelines.py --really-delete
|
||||
environment:
|
||||
CONSOLE_DB: "{{ CONSOLE_DB }}"
|
||||
become_user: safekeeper
|
||||
become: True
|
||||
register: hello
|
||||
|
||||
- debug: var=hello
|
||||
Reference in New Issue
Block a user