Архив записей, за декабря, 2024
Ansible playbook to add users with ssh keys and sudo
написано 3 декабря, 2024 - запись из раздела Несортированное | Комментировать
# yamllint disable rule:line-length — — name: Add admin users hosts: all gather_facts: true become: true tasks: — name: Create account ansible.builtin.user: name: "{{ item.name }}" groups: "sudo" shell: /bin/bash append: true with_items: "{{ users }}" — name: Set authorized key taken from file ansible.posix.authorized_key: user: "{{ item.name }}" exclusive: true key: "{{ item.ssh_pub_key }}" […]
Sentry cleanup
написано 2 декабря, 2024 - запись из раздела Несортированное | Комментировать
To cleanup self hosted Sentry you can use a following script: docker exec -it sentry-self-hosted-clickhouse-1 clickhouse-client -q ‘TRUNCATE default.spans_local’ docker exec -it sentry-self-hosted-clickhouse-1 clickhouse-client -q ‘TRUNCATE default.generic_metric_distributions_aggregated_local’ docker exec -it sentry-self-hosted-clickhouse-1 clickhouse-client -q ‘TRUNCATE default.generic_metric_distributions_raw_local’ docker exec -it sentry-self-hosted-clickhouse-1 clickhouse-client -q ‘TRUNCATE system.metric_log’ docker exec -it sentry-self-hosted-clickhouse-1 clickhouse-client -q ‘TRUNCATE default.transactions_local’ docker exec -it sentry-self-hosted-clickhouse-1 […]