gaqzi / ansible-ssh-config Goto Github PK
View Code? Open in Web Editor NEWLetting Ansible manage ssh config
Letting Ansible manage ssh config
At the moment there is no test suite to actually see whether the module is doing what it should.
It should be possible to do something with Cucumber or some Python equivalent to test these files.
Do you mind adding a license to this repo? (http://choosealicense.com/ for example)
Some people are just sticklers sometimes about these things.
Be careful on comment with ansible 2.x
I'm curious why this is included:
module.set_group_if_different(config_file, user, False)
In the next line the file permissions are set to 600, so the group of the file is irrelevant. Having this included causes this to appear to fail on systems that don't have a corresponding group for each user (like mac os x).
I say it "appears to fail" because since the config file is already written the end result of the task is actually fine, but ansible exits with failed and of course the rest of a playbook might not complete.
Unchanged entries in config file are lower-cased.
Not sure also - shouldn't it be better to keep all config parameters in camel case?
using this great command to set up .ssh/config
is always reporting as changed to ansible.
It should only report as changed, if the file was changed.
Hello,
Could you add the ForwardAgent yes option ?
There are a bunch of options available in ssh_config and it would be good to cover all of them.
I would prefer if they are covered in a correct way, only the actually correct values and so on. For example the StrictHostKeyChecking
option only takes one of yes
, no
, and ask
as parameters.
I haven't looked into whether the storm/paramiko code can be used to determine whether the option is valid or not. But possibly that could be used instead of writing our own logic for determining that for each option.
Either way all options needs to be made available to Ansible, so is it needed to add all options anyway? I know there are Ansible modules that takes any arguments, command for instance, but I don't know how that is implemented.
All options supported by OpenSSH are available in their man page.
When I install gaqzi.ssh-config with the -p option::
playbook$ ansible-galaxy install -p roles gaqzi.ssh-config
- downloading role 'ssh-config', owned by gaqzi
- downloading role from https://github.com/gaqzi/ansible-ssh-config/archive/v0.3.0.tar.gz
- extracting gaqzi.ssh-config to roles/gaqzi.ssh-config
- gaqzi.ssh-config was installed successfully
playbook$
The symlink in test/library/ssh_config is broken::
playbook$ tree roles/gaqzi.ssh-config/
roles/gaqzi.ssh-config/
├── CHANGELOG.md
├── library
│ └── ssh_config.py
├── meta
│ └── main.yml
├── README.md
└── test
├── library
│ └── ssh_config -> ../../ssh_config
├── roles
│ └── normal-user
│ └── tasks
│ ├── _assert.yml
│ └── main.yml
├── test.yml
└── Vagrantfile
playbook$
should it be ?::
│ └── ssh_config -> ../../library/ssh_config.py
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.