How to reboot CentOS 7 with Ansible?

You’re likely not doing anything truly wrong, it’s just that /sbin/reboot is shutting down the server so quickly that the server is tearing down the SSH connection used by Ansible before Ansible itself can close it. As a result Ansible is reporting an error because it sees the SSH connection failing for an unexpected reason. … Read more

Upgrade docker on CentOS 7 [closed]

Update to upgrade docker CentOS 7.4 sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install docker-ce sudo systemctl start docker sudo systemctl enable docker sudo systemctl status docker Refer: https://docs.docker.com/install/linux/docker-ce/centos/

How to use Rsync to copy only specific subdirectories (same names in several directories)

I’ve found the reason. As for me – it wasn’t clear that Rsync works in this way. So correct command (for company1 directory only) must be: rsync -avzn –list-only –include ‘company1/’ –include ‘company1/unique_folder1/***’ –exclude ‘*’ -e ssh user@server.com:/path/to/old/data/ /path/to/new/data I.e. we need include each parent company directory. And of course we cannot write manually all … Read more

Duplicate Package – update / upgrade – Centos

For me it looks like you rebooted your computer (or it crashed) while you where in the process of upgrading packages. So new packages where installed, but old packages where not removed. First look if you have any uncomplete transactions with: yum-complete-transaction If this doesn’t help then take a look at the package-cleanup tool which … Read more

Cannot change permissions of folders within vagrant home folder

The format for shared folders changes across different versions of Vagrant. See Fabio’s answer https://serverfault.com/questions/398414/vagrant-set-default-share-permissions Vagrant version 1.3.1 and earlier config.vm.share_folder “v-data”, “/export”, “/export”, :owner => ‘vagrant’, :group => ‘httpd’, :extra => ‘dmode=775,fmode=775’ Vagrant version 1.3.1, 1.3.2 In Vagrant 1.3.1 and later, the extra option has been replaced with mount_options that expects an array. config.vm.share_folder … Read more