Comments (6)
I think the regex filtering of servers
task would be a good start (code paths for similar functionality exist, see tags/servers).
Some notes:
- Set via flag or config, I'm thinking the name
--match
could be used - Target server hosts (so it's not regex for the server names, but for the server hosts)
- Write some unit tests
from sake.
I think I would pair this with another tool, like a python script, that generates the servers to connect to. But I would like to modify what that python tool generates (maybe select a different region or env) based on some runtime arguments that sake
would pass to the script. Not sure what the interface might look like.
from sake.
All features are released with v0.12.0 now. @josegonzalez you can now run the following:
servers:
inv:
inventory: ./some-python-script $somearg
env:
somearg: 192.168.1.2
# use default somearg 192.168.1.2
sake run <task> -s inv
# Pass CLI argument
sake run <task> -s inv somearg=192.168.1.99
from sake.
Hello! I’d like to contribute to this project, but I don’t want to duplicate anything that you’re actively working on. Is there anything on this issue that I can pick up, or should I find another one?
from sake.
Would be great to be able to pass arguments to whatever gets inventory. Something like:
# sake run -s server-1 -inventory-args "--expanded-args here"
servers:
# One of the following:
# host: 192.168.1.1
# hosts: www[01:50].example.com # look at https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#adding-ranges-of-hosts
# hosts:
# - 192.168.1.1
# - 192.168.1.2
inventory: some-command
So the inventory command would be:
some-command --expanded-args here
from sake.
Not sure I follow, do you mean something like this:
servers:
name: server-1
inventory: echo $SOME_ENV
$ sake run ping -s server-1 SOME_ENV="192.168.1.1,192.168.1.2"
which would run task ping
on servers:
- 192.168.1.1
- 192.168.1.2
from sake.
Related Issues (20)
- Improve Tasks HOT 4
- Allow multiple servers with the same host name HOT 2
- Same host different port HOT 2
- Should fail on non-zero exit HOT 11
- Configuration handling HOT 2
- Too many authentication failures when defining lots of servers HOT 2
- How do you pronounce sake? HOT 3
- How can a task pass a value to next task HOT 4
- error: strconv.ParseInt: parsing "": invalid syntax HOT 7
- Option to disable "Running" output HOT 1
- Sake vs Ansible? HOT 4
- Port out of range error when used in host string HOT 2
- Outdated docs and NPE when formatting table headers HOT 2
- Can't access libvirt hosts via dns name HOT 11
- Is there a way to specify an alternative user for ssh via flag? HOT 2
- Workdir for remote is being used by `local: true` task HOT 1
- ssh: handshake failed HOT 7
- Distinguish servers by server-name, port and user in output HOT 3
- Exec command with single quotes HOT 4
- Multiple bastions HOT 2
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 sake.