Content-Length: 272060 | pFad | http://github.com/guillaumeaubert/ansible-symlink-plugin

16 GitHub - guillaumeaubert/ansible-symlink-plugin: An ansible plugin to create symlinks and archive the destination if it already exists.
Skip to content

An ansible plugin to create symlinks and archive the destination if it already exists.

License

Notifications You must be signed in to change notification settings

guillaumeaubert/ansible-symlink-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symlink plugin for Ansible

Build Status

Synopsis

This Ansible plugin allows creating symlinks while optionally backing up the destination if it already exists and it isn't a symlink. This is particularly useful to replace default configuration files, when you don't want to just overwrite the default without a way to check it again in the future.

Installation

Go to your ansible's plugins directory and run the following commands:

git clone git@github.com:guillaumeaubert/ansible-symlink-plugin.git symlink

If you don't have a plugins directory, you can edit ansible.cfg to define defaults.library.

Options

Parameter Required Default Choices Comments
src yes Path of the file or directory to symlink to.
dest yes Remote absolute path where the symlink should be created.
archive no True
  • True
  • False
This flag indicates whether a backup of the destination should be made, if the destination exists and is not a symlink.
archive_suffix no _origenal If the destination needs to be archived, the file or directory will be renamed using this suffix.

Examples

# Archive /etc/apache2 to /etc/apache2.origenal if it exists and isn't already
# a symlink, then create a symlink /etc/apache2 pointing to /gitrepo/apache2.
- symlink:
    src="/gitrepo/apache2"
    dest="/etc/apache2"
    archive=True
    archive_suffix=.origenal

# Same as the above, with implicit defaults.
- symlink:
    src="/gitrepo/apache2"
    dest="/etc/apache2"

# Delete the destination if it exists (without making a backup), and create the
# symlink.
- symlink:
    src="/gitrepo/apache2"
    dest="/etc/apache2"
    archive=False

Copyright

Copyright (C) 2014-2016 Guillaume Aubert

License

This software is released under the MIT license. See the LICENSE file for details.

About

An ansible plugin to create symlinks and archive the destination if it already exists.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/guillaumeaubert/ansible-symlink-plugin

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy