From 297c423b17f1952b50073e74b14da86a39805011 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 25 Nov 2024 23:51:05 +0100 Subject: [PATCH] add remote host description --- README.md | 2 +- inventory.yml.dist | 6 ++++++ remote.md | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 remote.md diff --git a/README.md b/README.md index 0435fa0..d66aa66 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Commit changed files in the customers repository. - `cd deployer` - `composer update` -- apply changes in the `inventory.yml` +- apply changes in the `inventory.yml` ([setting up a remote host](remote.md)) - commit changes ## Project diff --git a/inventory.yml.dist b/inventory.yml.dist index c70e341..0084624 100644 --- a/inventory.yml.dist +++ b/inventory.yml.dist @@ -29,3 +29,9 @@ hosts: composer_options: --verbose --prefer-dist --no-progress --no-interaction # without no-dev option labels: role: development + + remote: + <<: *base + local: false + hostname: mydomain.com + config_file: ~/.ssh/config diff --git a/remote.md b/remote.md new file mode 100644 index 0000000..336a4d5 --- /dev/null +++ b/remote.md @@ -0,0 +1,15 @@ +# Creating remote host configuration on Deployer server + +Run `ssh-keygen` to create a key pair (naming example: `mydomain.com`) and transfer public key to remote host with `ssh-copy-id`. + +Create `~/.ssh/config` file to store connection parameters: + +``` +Host mydomain.com + HostName virtual.server.com + User mydfhtsy + Port 22 + IdentityFile ~/.ssh/mydomain.com +``` + +Setup the non-local host in the `inventory.yml` file.