Ansible - Dynamicaly update /etc/hosts files on target servers

I was configuring GlusterFS on few servers using Ansible  external link and have a need to update /etc/hosts with hostnames for easier configuration. I found this one working: - name: Update /etc/hosts lineinfile: dest=/etc/hosts regexp='.*{{item}}$' line='{{hostvars.{{item}}.ansible_default_ipv4.address}} {{item}}' state=present with_items: '{{groups.somegroup}}' Source: http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html  external link

2013-12-11 · 1 min · timor
[Ghost.org](https://ghost.org/docs/logos/)

Reset user password in your own Ghost Blog

Learn how to reset a user password in your own Ghost Blog by accessing the SQLite database and updating the password hash.

2013-11-28 · 1 min · timor
Disk usage visualisation

Inodes exhaustion on XFS

Learn about inodes exhaustion on XFS, how to check inode limits, and how to adjust the inode percentage to prevent issues on your Linux filesystem.

2013-11-27 · 1 min · timor

Kill with SIGSTOP and SIGCONT

I’ve bought a NAS and customized it a little. But there was one thing which make my nights sleepless. NAS was seeking disks every 5~10 seconds - these was really irritating - especially when it was silent in room. I found that part of firmware was indexing or logging something so I wanted it dead! kill -9 was unsuccessful - process restarted after a while…. wrrr… I googled a little and found another signal I could use SIGSTOP, which will freeze process until I send SIGCONT to it - that was exactly what I need (because I normally use NFS/Samba and don’t need nothing more running on this device). ...

2013-11-21 · 1 min · timor

My new toy - Iomega StorCenter ix2-200 Cloud Edition

I’ve just bought new toy - Iomega StorCenter ix2-200 Cloud Edition. I have to play with few options before I could start using it. First thing - Firmware upgrade. Firmware upgrade I’ve started searching for latest firmware for ix2-200 Cloud and found that I have to register on Lenovo site to get firmware… I don’t like such sites where they force me to give all private data, but after few clicks on “Recommended articles” on that site I landed here: https://lenovo-eu-en.custhelp.com/app/answers/detail/a_id/26790  external link So it looks that I don’t need to register - point for me. ...

2013-11-19 · 1 min · timor

Reenable web interface on Polycom VBP 5300 ST from CLI

After some configuration changes I’ve stuck with VBP not listening nor on HTTP, nor on SSH port. Last resort was to use CLI to reenable HTTP access. Connect with parameters: Baud rate: 9600 Parity: none Bits: 8 Stopbits: 1 Flow control: none Then in login prompt you have to use login credentials (yes - they’re the same on every box (WTF?)): User: - root Pass: - @#$%^&*!() Password is shift + 2345678190 - there is 1 before 9! ...

2013-11-18 · 1 min · timor

Changing language of articles on my blog to English

I’ve crated this blog to get feedback from other IT guys about what I’m doing wrong (or not good enough). But this idea failed… I have only few comments on my blog (and about thousand and a half spams per month) - so, no feedback in my national language at all. Switching to English should make my audience bigger and I hope to have more attention thanks to that. This will be also a good practice of my English skill. I hope to find enough free time to translate some of older articles, but for now I’m thinking rather about changing engine of blog - to something more convenient. Maybe Octopress  external link or Ghost  external link . ...

2013-11-15 · 1 min · timor

GearmanManager: wygodne zarządzanie workerami

Niedawno zainteresowałem się usługą Gearman i jedynej rzeczy której mi brakowało to jakiegoś łatwego mechanizmu zarządzającego workerami. Ale jak zwykle okazało się że inni mieli już ten problem i odpowiednie narzędzie istnieje - mowa o GearmanManagerze. Instalacja GearmanManagera Aby zainstalować GeramanManagera na serwerze gdzie już mamy Gearmana trzeba wykonać kilka kroków (wcześniej powinniśmy też zainstalować moduł gearmana do php’a): apt-get install git -y git clone https://github.com/brianlmoon/GearmanManager.git cd GearmanManager/install chmod +x install.sh ./install.sh Detecting linux distro as redhat- or debian-compatible Where is your php executable? (usually /usr/bin) /usr/bin Which PHP library to use, pecl/gearman or PEAR::Net_Gearman? 1) pecl 2) pear #? 1 Installing to /usr/local/share/gearman-manager Installing executable to /usr/local/bin/gearman-manager Installing configs to /etc/gearman-manager Installing init script to /etc/init.d/gearman-manager Install ok! Run /etc/init.d/gearman-manager to start and stop Worker scripts can be installed in /etc/gearman-manager/workers, configuration can be edited in /etc/gearman-manager/config.ini Mamy działającego GearmanManagera. Zalecam przyglądnięcie się plikowi config-advanced.ini bo jest tam kilka opcji, które warto dodatkowo ustawić. ...

2013-11-13 · 1 min · timor

Debian - zablokowanie aktualizacji pakietu

W teorii nie powinno się blokować aktualizacji pakietów bo łatają dziury itd…. Ale! Zdarzyły mi się ostatnio dwie sytuacje, które do tego mnie zmusiły: aktualizacja hudsona kończyła się błędem przy starcie usługi, aktualizacja domU Xen skończyła się problemem z kompatybilnością mechanizmu udev w systemie i jądrze (hypervisor miał starsze jądro niż spodziewało się DomU). W takich sytuacjach bardzo przydaje się możliwość zablokowania aktualizacji jednej “psującej” paczki na pewien okres czasu by nie opóźniać innych aktualizacji a sobie dać czas na rozpracowanie problemu. ...

2013-11-05 · 1 min · timor

Instalacja gearman-job-server 1.0.6 na Debianie Wheezy

Ostatnio trafiłem na ciekawą usługę, która pozwala oddelegować długo trwające zadania z usługi webowej. Mowa o Gearman’ie. Usługa jest o tyle ciekawa że nie narzuca ani języka dla klienta (większość popularnych ma gotowe biblioteki), ani język dla skryptów w tej usłudze nie jest narzucany. Można tę usługę wykorzystać jako most pomiędzy PHP a np. Javą/Pythonem lub do zlecenia zadań z serwera na Linux’ie do wykonania na serwerze Windowsowym (bo np. narzędzia dostępne są tylko dla Windowsa). O innych zaletach można poczytać na stronce więc nie będę przynudzać. Standardowo zainstalowałem paczkę z repo Debiania i rozbiłem się przy kompilacji modułu z PECL’a - w repo była jakaś prehistoryczna wersja. Postanowiłem uruchomić aktualną wersje 1.0.6 z gałęzi testowej przekompilowując ją na Wheezym (by uniknąć zależności z wersji testowej). ...

2013-10-29 · 2 min · timor