Monday, January 22, 2018

ansible logging and debugging

============================
If you pass the -v flag to ansible-playbook on the command line, you'll see the stdout and stderr for each task executed:

$ ansible-playbook -v playbook.yaml

You can also choose -vvv for more verbose output.

Check  for more options:
#ansible-playbook --help | less
============================
Ansible also has built-in support for logging.
Add the following lines to your ansible configuration file(/etc/ansible/ansible.cfg):

[defaults]
log_path=/path/to/logfile

============================


Sunday, January 21, 2018

Git aliases


================================
edit ~/.gitconfig as below:

[alias]
        fetch = fetch -v
co = checkout
================================

You can do the same using command line too: (which will in turn update ~/.gitconfig file)

# git config --global alias.co checkout

================================
You can list/verify same using the command

# git config --global -l
...
...
alias.fetch=fetch -v

alias.co=checkout
================================




Thursday, January 11, 2018

Lauch printer from terminal (fedora)



From fedora OS, if you want to launch printer control with root access, do this:

sudo gnome-control-center printers 

Thursday, November 23, 2017

Docker networking issue - IPV4 forwarding is disabled error and Fix



During docker build, faced the following error:

Docker Networking Disabled: WARNING: IPv4 forwarding is disabled. Networking will not work

So, all yum install commands failed.

Fix:

Added the following to /etc/sysctl.conf:

net.ipv4.ip_forward=1


Then restarted the network service.
Now, docker build should be able to reach the network.


Note to self:
Next, time keep an eye on all the warnings faced during docker build itself :) 




Tuesday, November 21, 2017

list files in installed package/rpm file


list the files for already INSTALLED package:

rpm -ql package-name


To list the files for specific RPM package downloaded:

rpm -qlp package.rpm