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

Comments

Projects
None yet
@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 from can semaphore support for dynamic inventories to can semaphore support dynamic inventories Oct 16, 2015

@gvenka008c

This comment has been minimized.

Show comment
Hide comment
@gvenka008c

gvenka008c Mar 16, 2016

@here... Any updates on this?

gvenka008c commented Mar 16, 2016

@here... Any updates on this?

@lakshmantgld

This comment has been minimized.

Show comment
Hide comment
@lakshmantgld

lakshmantgld Mar 16, 2016

@gvenka008c No answers. Built my own Ansible Tower.

lakshmantgld commented Mar 16, 2016

@gvenka008c No answers. Built my own Ansible Tower.

@gvenka008c

This comment has been minimized.

Show comment
Hide comment
@gvenka008c

gvenka008c Mar 16, 2016

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

gvenka008c commented Mar 16, 2016

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

@gvenka008c

This comment has been minimized.

Show comment
Hide comment
@gvenka008c

gvenka008c Mar 16, 2016

@Lakshman-LD Any updates?

gvenka008c commented Mar 16, 2016

@Lakshman-LD Any updates?

@matejkramny

This comment has been minimized.

Show comment
Hide comment
@matejkramny

matejkramny Mar 16, 2016

Member

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

Member

matejkramny commented Mar 16, 2016

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

@lakshmantgld

This comment has been minimized.

Show comment
Hide comment
@lakshmantgld

lakshmantgld Mar 17, 2016

Dont have any repo to share!! sorry @gvenka008c

lakshmantgld commented Mar 17, 2016

Dont have any repo to share!! sorry @gvenka008c

@gvenka008c

This comment has been minimized.

Show comment
Hide comment
@gvenka008c

gvenka008c Mar 17, 2016

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

gvenka008c commented Mar 17, 2016

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

@gvenka008c

This comment has been minimized.

Show comment
Hide comment
@gvenka008c

gvenka008c Mar 17, 2016

@Lakshman-LD Thanks.

gvenka008c commented Mar 17, 2016

@Lakshman-LD Thanks.

@matejkramny

This comment has been minimized.

Show comment
Hide comment
@matejkramny

matejkramny Mar 21, 2016

Member

@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

Member

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

This comment has been minimized.

Show comment
Hide comment
@matejkramny

matejkramny Mar 21, 2016

Member

Dynamic inventories will be supported in version 2 of semaphore.

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

Member

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 referenced this issue Mar 28, 2016

Closed

V2 Roadmap #72

9 of 21 tasks complete

@matejkramny matejkramny modified the milestones: 2.1, 2.0 Apr 24, 2016

@matejkramny

This comment has been minimized.

Show comment
Hide comment
@matejkramny

matejkramny Apr 24, 2016

Member

Sorry guys, reassigned to v2.1 release

Member

matejkramny commented Apr 24, 2016

Sorry guys, reassigned to v2.1 release

@matejkramny matejkramny changed the title from can semaphore support dynamic inventories to Dynamic Inventory support Apr 24, 2016

@adambonny

This comment has been minimized.

Show comment
Hide comment
@adambonny

adambonny commented Apr 25, 2016

👍

@nathan-v

This comment has been minimized.

Show comment
Hide comment
@nathan-v

nathan-v May 25, 2016

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

nathan-v commented May 25, 2016

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

@matejkramny

This comment has been minimized.

Show comment
Hide comment
@matejkramny

matejkramny May 25, 2016

Member

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?

Member

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

This comment has been minimized.

Show comment
Hide comment
@nathan-v

nathan-v 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.

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

This comment has been minimized.

Show comment
Hide comment
@srpayne

srpayne Jul 21, 2016

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

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

This comment has been minimized.

Show comment
Hide comment
@pgporada

pgporada Sep 14, 2016

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

pgporada commented Sep 14, 2016

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

@theasp

This comment has been minimized.

Show comment
Hide comment
@theasp

theasp 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.

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

This comment has been minimized.

Show comment
Hide comment
@pgporada

pgporada Mar 9, 2017

@theasp Fantastic idea!

pgporada commented Mar 9, 2017

@theasp Fantastic idea!

@matejkramny matejkramny referenced this issue Apr 19, 2017

Closed

Roadmap #325

1 of 22 tasks complete
@JanSchr

This comment has been minimized.

Show comment
Hide comment
@JanSchr

JanSchr Apr 29, 2017

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

JanSchr commented Apr 29, 2017

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

@morph027

This comment has been minimized.

Show comment
Hide comment
@morph027

morph027 May 6, 2017

Contributor

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

Contributor

morph027 commented May 6, 2017

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

@punktik

This comment has been minimized.

Show comment
Hide comment
@punktik

punktik 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.

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

This comment has been minimized.

Show comment
Hide comment
@aioue

aioue Jun 2, 2017

Contributor

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

Contributor

aioue commented Jun 2, 2017

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

@tobiasfielitz

This comment has been minimized.

Show comment
Hide comment
@tobiasfielitz

tobiasfielitz Aug 4, 2017

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

tobiasfielitz commented Aug 4, 2017

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

@anitakrueger

This comment has been minimized.

Show comment
Hide comment
@anitakrueger

anitakrueger 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

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

This comment has been minimized.

Show comment
Hide comment
@brad

brad Sep 8, 2017

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

brad commented Sep 8, 2017

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

@GanimanSwift

This comment has been minimized.

Show comment
Hide comment
@GanimanSwift

GanimanSwift 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.

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.

@jospina-316

This comment has been minimized.

Show comment
Hide comment
@jospina-316

jospina-316 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

jospina-316 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

This comment has been minimized.

Show comment
Hide comment
@ndeixonne

ndeixonne 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.

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

This comment has been minimized.

Show comment
Hide comment
@twhiston

twhiston Feb 16, 2018

Member

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.....)

Member

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

This comment has been minimized.

Show comment
Hide comment
@twhiston

twhiston Mar 27, 2018

Member

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

Member

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