Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Inventory support #47

Closed
lakshmantgld opened this issue Oct 15, 2015 · 31 comments
Closed

Dynamic Inventory support #47

lakshmantgld opened this issue Oct 15, 2015 · 31 comments
Labels
Milestone

Comments

@lakshmantgld
Copy link

@lakshmantgld lakshmantgld commented Oct 15, 2015

I use aws with ansible, so dynamic inventory is used instead of adding hosts manually. Is this possible with semaphore?
Documentation for running playbooks from local machine? I am not able see the documentation for running test playbooks with git repo, if I have missed it, can you point the documentation.

@lakshmantgld lakshmantgld changed the title can semaphore support for dynamic inventories can semaphore support dynamic inventories Oct 16, 2015
@gvenka008c
Copy link

@gvenka008c gvenka008c commented Mar 16, 2016

@here... Any updates on this?

@lakshmantgld
Copy link
Author

@lakshmantgld lakshmantgld commented Mar 16, 2016

@gvenka008c No answers. Built my own Ansible Tower.

@gvenka008c
Copy link

@gvenka008c gvenka008c commented Mar 16, 2016

@Lakshman-LD Thanks. Got any repo to clone / view your Ansible tower version?

@gvenka008c
Copy link

@gvenka008c gvenka008c commented Mar 16, 2016

@Lakshman-LD Any updates?

@matejkramny
Copy link
Member

@matejkramny matejkramny commented Mar 16, 2016

You can automate the API, or adjust runner.js to have dynamic inventory.

@lakshmantgld
Copy link
Author

@lakshmantgld lakshmantgld commented Mar 17, 2016

Dont have any repo to share!! sorry @gvenka008c

@gvenka008c
Copy link

@gvenka008c gvenka008c commented Mar 17, 2016

@matejkramny I updated runner.js. How can i ensure the updated script is picked up by docker?

@gvenka008c
Copy link

@gvenka008c gvenka008c commented Mar 17, 2016

@Lakshman-LD Thanks.

@matejkramny
Copy link
Member

@matejkramny matejkramny commented Mar 21, 2016

@gvenka008c you can re-build the image or create an image from the semaphore image, and then edit those files.. Or you can attach to the container and edit files directly, restarting the node process afterwards

@matejkramny
Copy link
Member

@matejkramny matejkramny commented Mar 21, 2016

Dynamic inventories will be supported in version 2 of semaphore.

It is WIP in branch https://github.com/ansible-semaphore/semaphore/tree/v2

@matejkramny matejkramny added this to the v2 milestone Mar 27, 2016
@matejkramny matejkramny mentioned this issue Mar 28, 2016
9 of 21 tasks complete
@matejkramny matejkramny modified the milestones: 2.1, 2.0 Apr 24, 2016
@matejkramny
Copy link
Member

@matejkramny matejkramny commented Apr 24, 2016

Sorry guys, reassigned to v2.1 release

@matejkramny matejkramny changed the title can semaphore support dynamic inventories Dynamic Inventory support Apr 24, 2016
@adambonny
Copy link

@adambonny adambonny commented Apr 25, 2016

👍

@nathan-v
Copy link

@nathan-v nathan-v commented May 25, 2016

Is there any update on when this feature will be available?

@matejkramny
Copy link
Member

@matejkramny matejkramny commented May 25, 2016

It'll be a couple of weeks/days.

So far (in my mind) the inventory will fetch EC2 instances using an AWS key, then filter it by a regex specified by the user.

Is there more to it or just simple as that?

@nathan-v
Copy link

@nathan-v nathan-v commented May 26, 2016

Better would be utilizing the EC2 instance tags rather than just the instance metadata.

My preference would be to also allow instance selection by grabbing instances that are members of an Auto Scaling Group. Often instances in AWS are deployed initially as AMIs to ASGs; being able to target the ASG members would be awesome.

@srpayne
Copy link

@srpayne srpayne commented Jul 21, 2016

Why not just use ec2.py instead of creating something new? or give the option of piping to it?

@pgporada
Copy link

@pgporada pgporada commented Sep 14, 2016

I was expecting to be able to point at a custom inventory file as well.

@theasp
Copy link

@theasp theasp commented Mar 9, 2017

@pgporada I agree. I'm able to do it using an empty inventory in Semaphore (I named it "From Hosts File"), and adding this to the "Extra CLI Arguments":

["--inventory", "hosts", 
 "--limit", "some-group"]

Being able to specify a file from the git repository would allow running it as a script, as per normal ansible behaviour.

@pgporada
Copy link

@pgporada pgporada commented Mar 9, 2017

@theasp Fantastic idea!

@matejkramny matejkramny mentioned this issue Apr 19, 2017
1 of 22 tasks complete
@JanSchr
Copy link

@JanSchr JanSchr commented Apr 29, 2017

Beeing able to choose an inventory file from a git repository would be awesome.

@morph027
Copy link
Contributor

@morph027 morph027 commented May 6, 2017

Jip, would love it! So far, the extra cli arguments stuff works for me.

@punktik
Copy link

@punktik punktik commented May 8, 2017

Is there anywhere a howto for someone not familiar with nodejs?
I still cannot selct AWS dynamical inventory.
Thank you in advance for your help.

@aioue
Copy link
Contributor

@aioue aioue commented Jun 2, 2017

is this released yet? It's greyed out in 2.3.0

@tobiasfielitz
Copy link

@tobiasfielitz tobiasfielitz commented Aug 4, 2017

Still grayed out in v2.4.1. I have added AWS credentials in Key Store.

@anitakrueger
Copy link

@anitakrueger anitakrueger commented Aug 15, 2017

Hi there,
I've just installed semaphore 2.4.1 and got all excited that I could now use AWS as the inventory. But when trying to create an inventory, as @tobiasfielitz said, AWS is greyed out as an option.
Is there a configuration step I am missing which is why it is greyed out? Or is the functionality not available yet?

Thanks!
Anita

@brad
Copy link

@brad brad commented Sep 8, 2017

@aioue @tobiasfielitz @anitakrueger It's still unchecked in the roadmap (listed there as "Remote Inventories")

@GanimanSwift
Copy link

@GanimanSwift GanimanSwift commented Sep 25, 2017

I think this missing feature is what's going to prevent me from using Semaphore. I'd really like to be able to point it at a custom script.

@ghost
Copy link

@ghost ghost commented Dec 20, 2017

Is there a way to just point a static inventory to the ansible hosts file on the server semaphore is running off? e.g. /etc/ansible/hosts

@ndeixonne
Copy link

@ndeixonne ndeixonne commented Dec 20, 2017

Actually you can specify custom inventory. You jsut need to override the parameter -i in the task template. The last -i in the code is given the priority.
If you need override any other parameters, try to override it in task template.

With -i, you can specify a custom script located in your git playbook, the custom script will be downloaded automatically and so you can use relative path. ex: ["-i","script.sh"] and script.sh is in the directory of your playboo in git.

@twhiston
Copy link
Member

@twhiston twhiston commented Feb 16, 2018

I would like to try to get this feature in, via the api rather than an -i override into a 2.6.0 version
Dynamic inventory source should also allow 'none' so user can set only with cli arguments if required (to avoid empty inventory workarounds etc.....)

@twhiston
Copy link
Member

@twhiston twhiston commented Mar 27, 2018

closing this as file type of inventory allows for dynamic inventory files to be included in the source repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.