By using github and transferring all your playbooks/code to it, will allow it to be in a safe place and managed in one location. This will allow you to create repository you can pull and push data from your onprem machine to github and vice versa. This is great because it will allow version control for your team as well.

Open the following url

https://github.com/signup

Put in your details and continue

Do the puzzle

Get your code from your email and continue

Sign in

Create repository and give it a name

Create a new project

Click add file and click create new file

You can put in a foldername and / to turn it into a folder

Then put in readme.txt and click commit changes

Click commit changes

Now add file and click upload files

Drag your files and folder you want save in gitgub

Click commit changes

Now I will download everything to my ansible control node, create a new file and push to github.

Click your icon in the right-hand corner, click settings

Click ssh and gpg keys on the right > click new ssh key

Give it a name

Go to your control node and obtain your .pub key

Paste into github and click add sshkey

Now go to your repo and click code > click ssh > and click the copy icon

Connect your ansible control node to your github. Be in the folder you want save them too.

Use the git clone command

This has now been pulled down

Now I will create a new file and try to push to github

Type git status to see all the changes

First you need to add the file using git add

Then commit the file using git commit

Then push to the repo using git push

You need to compare and pull request

You need to merge and commit the file at this point

New file is there now

Commands below

cd /home/user/.ssh/
cat id_ed25519.pub
git clone git@github.com:username/ansible.git
cd ansible/
sudo nano readme.txt
git status
git add readme.txt
git commit -m "upload readme.txt"
git push origin master
git push origin HEAD:master

git config --global user.name "user"
git config --global user.email "user"

git config pull.rebase false
git pull origin HEAD:master

git config pull.rebase false  # merge
git config pull.rebase true   # rebase
git config pull.ff only       # fast-forward only

By Kad