Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add vars for prefix and user and project name #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

akiryliuk
Copy link

No description provided.

AndreyKiryliuk added 5 commits March 15, 2018 22:39
Add ssh_config_host_prefix
and ssh_config_default_user
add
ssh_config_force_user
ssh_config_default_user
ssh_config_host_prefix
add ssh_config_project_name for multiple project use
add ssh_config_project_name for multiple project use
add
ssh_config_force_user
ssh_config_default_user
ssh_config_host_prefix
ssh_config_project_name
@@ -39,6 +39,11 @@ Role Variables
|`ssh_config_file`|`{{ssh_configs_dir}}/ssh_config`|Where should the SSH client configuration be written to? Most implementations use `~/.ssh/config` so you can change this if you want.|
|`inventory_groups`|`["all"]`|Which inventory groups should we read to create SSH client configuration for? By default the built-in group `all` will be used since it should always be valid. `ungrouped` is also a built-in group name. To get a full list of groups in your Ansible directory, use `ansible -m debug -a 'var=groups.keys()\|sort' localhost`.|
|`keepgroupnames`|`"False"`|Should ansible groupname(s) be used to create a pattern for hostname ? When a server is part of several groups, then additionnal patterns will be created to match each and every group. When set to `"True"` and with inventory file example below, `ssh server1` **and** `ssh production.server1` will both work.|
| `ssh_config_project_name` | `` | Project name for use in marker. |
| `ssh_config_host_prefix` | `` | Prefix for add to hostname. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not completely understanding the use case for a host prefix. Can you elaborate more? It sounds like something specific to your environment maybe?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On some servers I use two different logins.
one with root rights.
and the second for working with the deployed application
and I connect to them in different ways, for example:
ssh rapp # for rott access
ssh app # for app user access

@@ -39,6 +39,11 @@ Role Variables
|`ssh_config_file`|`{{ssh_configs_dir}}/ssh_config`|Where should the SSH client configuration be written to? Most implementations use `~/.ssh/config` so you can change this if you want.|
|`inventory_groups`|`["all"]`|Which inventory groups should we read to create SSH client configuration for? By default the built-in group `all` will be used since it should always be valid. `ungrouped` is also a built-in group name. To get a full list of groups in your Ansible directory, use `ansible -m debug -a 'var=groups.keys()\|sort' localhost`.|
|`keepgroupnames`|`"False"`|Should ansible groupname(s) be used to create a pattern for hostname ? When a server is part of several groups, then additionnal patterns will be created to match each and every group. When set to `"True"` and with inventory file example below, `ssh server1` **and** `ssh production.server1` will both work.|
| `ssh_config_project_name` | `` | Project name for use in marker. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to stick with using the group as the marker as "project name" seems too implementation specific. Maybe there just needs to be a generic variable for modifying the marker so someone could add anything they want.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants