Skip to content

Instantly share code, notes, and snippets.

View piotr-gbyliczek's full-sized avatar

Piotr Gbyliczek piotr-gbyliczek

View GitHub Profile
@piotr-gbyliczek
piotr-gbyliczek / testcase.yml
Created May 22, 2019 08:48
azure_appgateway_testcase
---
- name: testcase
hosts: localhost
connection: local
gather_facts: true
# strategy: debug
vars:
project_name: "basic"
# fill the belov variables with details relevant to your azure environment
- name: find dirs to scan
find:
file_type: directory
path: "{{ item.dir }}"
patterns: "{{ item.pattern }}"
use_regex: yes
register: directories
with_items: "{{ dynamic_directories }}"
- name: find files to remove
# stop services
systemctl stop rh-mongodb34-mongod httpd dynflowd postgresql puppet puppetserver qdrouterd qpidd smart_proxy_dynflow_core tomcat foreman* pulp*
# Remove foreman
yum remove foreman foreman-installer foreman-proxy pulp*
rm -rf /var/lib/foreman* /usr/share/foreman /usr/share/foreman-proxy/logs /var/lib/qpidd
rm -rf /etc/*foreman* /var/lib/tomcat/* /var/lib/pulp/* /opt/puppetlabs /opt/theforeman /opt/rh /var/lib/pgsql/data /var/cache/foreman-proxy /var/cache/pulp
rm -rf /etc/httpd/conf.d/*foreman* /etc/httpd/conf.d/passenger.conf /etc/candlepin /etc/pulp /etc/puppetlabs /etc/qpid*
rm -rf /etc/smart_proxy_dynflow_core /etc/opt/rh /var/opt/theforeman /var/www/html/pub/katello* /usr/lib/python2.7/site-packages/katello_certs_tools
rm -rf /etc/opt/theforeman /etc/hammer /etc/pki/katello /etc/pki/katello-certs-tools /etc/sudoers.d/foreman-proxy
TASK [set user limits] *********************************************************
failed: [default] (item={u'comment': u'Oracle', u'domain': u'oracle', u'type': u'soft', u'name': u'nofile', u'value': 1024}) => {"failed": true, "item": {"comment": "Oracle", "domain": "oracle", "name": "nofile", "type": "soft", "value": 1024}, "msg": "Invalid configuration of '/etc/security/limits.conf'. Current value of nofile is unsupported."}
failed: [default] (item={u'comment': u'Oracle', u'domain': u'oracle', u'type': u'hard', u'name': u'nofile', u'value': 65536}) => {"failed": true, "item": {"comment": "Oracle", "domain": "oracle", "name": "nofile", "type": "hard", "value": 65536}, "msg": "Invalid configuration of '/etc/security/limits.conf'. Current value of nofile is unsupported."}
failed: [default] (item={u'comment': u'Oracle', u'domain': u'oracle', u'type': u'soft', u'name': u'nproc', u'value': 2047}) => {"failed": true, "item": {"comment": "Oracle", "domain": "oracle", "name": "nproc", "type": "soft", "value": 2047},
cluster_addresses="{% for node in groups['all'] -%}{{ hostvars[node]["ansible_" + comm_if]["ipv4"]["address"] }}{% if not loop.last %},{% endif %} {%- endfor %}"
[...]
node_address={{ "ansible_"+comm_if["ipv4"]["address"] }}
[...]
@piotr-gbyliczek
piotr-gbyliczek / xtrabackup_runner.sh
Last active October 27, 2020 18:56 — forked from sveesible/xtrabackup_runner.sh
A fancier mysql backup script for Xtrabackup:
#!/bin/bash
# Script to create full and incremental backups (for all databases on server) using innobackupex from Percona.
# http://www.percona.com/doc/percona-xtrabackup/innobackupex/innobackupex_script.html
#
# (C)2017 Piotr Gbyliczek (p.gbyliczek at node4.co.uk)
# - changed to use build in compression mechanism
# - corrected restore process (restore from mixed compressed and uncompressed incrementals is supported as well)
# - tidied up script a bit and added new checks
# - removed unneeded xbstream usage (useful only for network transfers, not compatible with incremental backups)
# A sample configuration file to setup ROBO, based on https://github.com/gluster/gdeploy/blob/master/examples/hc.conf
[hosts]
host1
host2
host3
# Do a sanity check before proceding
[script1]
action=execute
2016-09-30 14:04:27,940 INFO [org.ovirt.engineextensions.aaa.ldap.Framework] (default task-20) [] [ovirt-engine-extension-aaa-ldap.authn::company.co.uk-authn] Creating LDAP pool 'authz'
2016-09-30 14:04:27,969 WARN [org.ovirt.engineextensions.aaa.ldap.AuthnExtension] (default task-20) [] [ovirt-engine-extension-aaa-ldap.authn::company.co.uk-authn] Cannot initialize LDAP framework, deferring initialization. Error: An error occurred while attempting to connect to server ldap.company.co.uk:389: java.io.IOException: LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server ldap.company.co.uk/10.2.88.140:389: java.net.UnknownHostException: ldap.company.co.uk') caused by LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server ldap.company.co.uk/10.2.88.140:389: java.net.UnknownHostException: ldap.company.co.uk')LDAPException(resultCode=91 (connect error), errorMessag
ovirt.engine.extension.name = company.co.uk-authn
ovirt.engine.extension.bindings.method = jbossmodule
ovirt.engine.extension.binding.jbossmodule.module = org.ovirt.engine-extensions.aaa.ldap
ovirt.engine.extension.binding.jbossmodule.class = org.ovirt.engineextensions.aaa.ldap.AuthnExtension
ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.aaa.Authn
ovirt.engine.aaa.authn.profile.name = company.co.uk
ovirt.engine.aaa.authn.authz.plugin = company.co.uk-authz
config.profile.file.1 = ../aaa/company.co.uk.properties
awk 'BEGIN{found=0} /-------/{found=1;next}; /^$/{found=0} {if (found) print };'