Skip to content

Commit

Permalink
add ssh_backup option with default true
Browse files Browse the repository at this point in the history
  • Loading branch information
skwde committed Apr 26, 2023
1 parent 295c556 commit 18d6846
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ owned by `root:root` with mode `0644` by default, unless
`ssh_user!=null`. In that case, the mode is `0600` and owner and
group are derived from username given in `ssh_user` variable.

* `ssh_backup`:

When set to false, the original ssh_config file is not backed up. Default is true.

## Dependencies

none
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ ssh_config_mode: null

# the override for the configuration file we are writing
ssh_config_file: null

# create backup of ssh_config
ssh_backup: true
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{% else %}
true %s
{% endif %}
backup: true
backup: "{{ ssh_backup }}"
vars:
__ssh_skip_defaults: >-
{% if ssh_skip_defaults != 'auto' %}
Expand Down

0 comments on commit 18d6846

Please sign in to comment.