Bash Script to append “host and ip entries” in remote server “/etc/hosts” file

We can use below script to add host and ip entries in /etc/hosts file. $ cat append.sh #!/bin/bash ## Append hostname and IP in /etc/hosts file hostname=$1 ip=$2 /usr/bin/sshpass -p ‘password’ ssh user@$1 "echo password | sudo -S sh -c ‘echo "$2 $1 $1.example.com" >> /etc/hosts’" $ sh append.sh test-server 192.168.1.100 It will make entry […]

Pulp Commands – Open Source Repository

Pulp is basically a open source repository management from where you can create a repository for your environment. You can copy a remote repository or can hosts your rpms.There are lot of commands which can help you managing your pulp repository. Start, Stop and Restart pulp services: # systemctl start pulp_celerybeat # systemctl start pulp_resource_manager […]