Comments (6)
@johnnybubonic I haven't made any contributions to this repo so I can only speak in general. My inclination is to agree with the points you are raising but I've recently been made aware of a situation which complicates things. It started with an issue and PR in the postgres-formula
:
The problem was that a fix for some is a whitespace bomb for others -- as I mentioned in my comment regarding the fix.
This led back to a stale issue in the main repo. After various discussions, that issue has been re-opened, so hopefully we can attain consistency when making fixes such as the ones you are suggesting.
from openssh-formula.
@myii Thanks for bringing that upstream issue to my attention re: per-file trimming etc. I've subscribed to it to follow. It's a good thing SSH doesn't have whitespace-dependent parsing! I can only imagine the headache for things that do.
I think a lot of it - at least for this issue, for openssh-formula - can be addressed by just getting rid of the majority if not all of the macros. They're superfluous - many times they're used where simple for-loops could just be used instead with raw whitespacing in the template rather than trying to macro out the whitespacing/indentation and linebreaking. It seems to largely be an unnecessary complication. Alternatively, changing to something like a raw py template instead would probably be a lot more elegant.
from openssh-formula.
or one could just use the augeas state instead.
from openssh-formula.
I think a lot of it - at least for this issue, for openssh-formula - can be addressed by just getting rid of the majority if not all of the macros. They're superfluous - many times they're used where simple for-loops could just be used instead with raw whitespacing in the template rather than trying to macro out the whitespacing/indentation and linebreaking. It seems to largely be an unnecessary complication. Alternatively, changing to something like a raw py template instead would probably be a lot more elegant.
@johnnybubonic If the resulting template is generally easier to understand, I'll be happy to merge your PR. Please stick to SLS. While it may not always be as elegant as Python, it lowers the bar for contributions.
from openssh-formula.
sure - i'll try to get a PR in. not sure when that'll be exactly (i'm.. in the middle of converting our infra over to salt, obviously...), but i'll keep it to SLS. would you be OK with using the augeaus state in addition/instead? it should be part of salt core.
from openssh-formula.
@johnnybubonic AFAIK augeas needs additional python libraries on the minion. Therefore I (and I think others) favor SLS templates.
Have a look at https://github.com/saltstack-formulas/systemd-formula/blob/master/TOFS_pattern.md too, if you want to use alternative template files.
from openssh-formula.
Related Issues (20)
- Test config before restarting service HOT 6
- Some minor version issues HOT 2
- Indenting does not render properly HOT 2
- openssh.config_ini / HostKey clobbering HOT 1
- Needs workaround for RedHat-family 6.x with SELinux enabled ("check_cmd execution failed ... Permission denied") (fix included) HOT 2
- Jinja error: variable 'dict object' has no attribute 'ssh_config'
- Wish: Add support for Win32-OpenSSH HOT 1
- Indicate deprecated config HOT 2
- Sort example pillar options HOT 1
- config_ini duplicating lines due to tab instead of space (e.g. Subsystem) HOT 14
- Implement `semantic-release` for this formula HOT 17
- Convert tests from Serverspec to Inspec (working on both Docker and Vagrant) HOT 1
- Change file extension of `_pillar/known_hosts_salt_ssh.sls` to `.py`
- [BUG] ssh_config multiple IdentityFile not supported HOT 4
- Deprecated option UsePrivilegeSeparation HOT 2
- [BUG] When running with salt-ssh, getting error that 'opts' is not defined. HOT 2
- [BUG] Aliases in known_hosts not picked up HOT 2
- [BUG] Log cluttered with message: "'delimiter' and 'merge' options of 'config.get' are skipped when the salt command type is 'unknown'" HOT 8
- [FEATURE] Lookup ListenAddress from Pillar key
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openssh-formula.