- command line values (for example, -u my_user, these are not variables)
- role defaults (defined in role/defaults/main.yml)
- inventory file or script group vars
- inventory group_vars/all
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
tasks: | |
- name: Ansible delete file wildcard | |
find: | |
paths: /etc/wild_card/example | |
patterns: "^he.*.txt" | |
use_regex: true | |
register: wildcard_files_to_delete | |
- name: Ansible remove file wildcard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y epel-release | |
yum install -y bind-utils unzip jq | |
cd ~/ | |
wget https://releases.hashicorp.com/consul/1.0.2/consul_1.0.2_linux_amd64.zip | |
unzip consul_1.0.2_linux_amd64.zip | |
mv consul /usr/local/bin/ | |
adduser consul | |
mkdir /etc/consul.d | |
chown -R consul:consul /etc/consul.d/ | |
mkdir /var/consul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a folder for our new root structure | |
$ export centos_root='/centos_image/rootfs' | |
$ mkdir -p $centos_root | |
# initialize rpm database | |
$ rpm --root $centos_root --initdb | |
# download and install the centos-release package, it contains our repository sources | |
$ yum reinstall --downloadonly --downloaddir . centos-release | |
$ rpm --root $centos_root -ivh centos-release*.rpm | |
$ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | |
# install yum without docs and install only the english language files during the process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Restart rsyslog so it re-opens its file pointer (e.g. during logrotate postrotate script) | |
# via https://access.redhat.com/solutions/232793 | |
kill -HUP $(cat /var/run/syslogd.pid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# It is probably redundant if you set settings mentioned in https://gist.github.com/zekefast/42273658939724ba7c7a . | |
# But anyway it will not hurt anybody (sure if you are not putting your production database to RAM :)). | |
# | |
# Look for more detailed description in follow articles: | |
# - http://blog.vergiss-blackjack.de/2011/02/run-postgresql-in-a-ram-disk/ | |
# | |
# ATTENTION: | |
# DO NOT apply this approach if you store important data in postgresql cluster, because that could cause |
As configured in my dotfiles.
start new:
tmux
start new with session name: