Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
MASTER_IP= | |
SLAVE_IP= | |
# service postgresql stop | |
su - postgres | |
psql -c "CREATE ROLE replica WITH PASSWORD 'myreplpassword' LOGIN REPLICATION;" | |
#Security for master allow standby access | |
echo "host replication replica $SLAVE_IP/32 md5" >> /etc/postgresql/9.6/main/pg_hba.conf |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
by Bjørn Friese
Beautiful is better than ugly. Explicit is better than implicit.
I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.