aws inventory #2

Merged
vincentvdk merged 0 commits from feature/docs into master 2020-10-30 01:59:28 +00:00
vincentvdk commented 2020-10-20 05:04:57 +00:00 (Migrated from gitlab.com)

Updated readme and provides example configuration file

Updated readme and provides example configuration file
reel (Migrated from gitlab.com) approved these changes 2020-10-20 05:04:57 +00:00
reel commented 2020-10-20 23:03:27 +00:00 (Migrated from gitlab.com)

Sorry I'll need a little more help with this issue. https://gitlab.com/stationgroup/ansible-target-practice/-/issues/1

Sorry I'll need a little more help with this issue. https://gitlab.com/stationgroup/ansible-target-practice/-/issues/1
vincentvdk commented 2020-10-21 04:59:30 +00:00 (Migrated from gitlab.com)

Hi @reel ,

I must have been confused. I thought you only needed to know how the EC2 inventory. But if I'm right you want a playbook that either registers instances or not in an ALB target group based on a variable.

I'll need to do a bit more work for this though. I'll try to have this finished asap.

Hi @reel , I must have been confused. I thought you only needed to know how the EC2 inventory. But if I'm right you want a playbook that either registers instances or not in an ALB target group based on a variable. I'll need to do a bit more work for this though. I'll try to have this finished asap.
reel commented 2020-10-21 05:03:19 +00:00 (Migrated from gitlab.com)

Thank you, just add the extra hours.

Thank you, just add the extra hours.
vincentvdk commented 2020-10-24 11:14:55 +00:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>b295ca88 - add ansible playbook example</li></ul> [Compare with previous version](/stationgroup/ansible-target-practice/-/merge_requests/1/diffs?diff_id=120206230&start_sha=c19d75b5300facc868ead748ce3e4078aa6515f2)
vincentvdk commented 2020-10-24 11:17:25 +00:00 (Migrated from gitlab.com)

Updated example

Updated example
reel commented 2020-10-28 04:32:50 +00:00 (Migrated from gitlab.com)

Thanks I'm testing it.

Thanks I'm testing it.
reel commented 2020-10-29 01:02:42 +00:00 (Migrated from gitlab.com)

should be stopped

should be `stopped`
reel commented 2020-10-29 01:02:43 +00:00 (Migrated from gitlab.com)

should be "{{ hostvars[inventory_hostname].instance_id }}"

should be `"{{ hostvars[inventory_hostname].instance_id }}"`
reel commented 2020-10-29 01:02:43 +00:00 (Migrated from gitlab.com)

tag_dev_env should be tag_env_dev

`tag_dev_env` should be `tag_env_dev`
reel commented 2020-10-29 01:50:25 +00:00 (Migrated from gitlab.com)

When I try to execute tasks on the remote instance by adding:

    - name: 'check if example file exists'
      stat:
        path: /tmp/example-exists
      when: blitz == "true"
      register: example_exists_file

It checks the local filesystem but shows the instance IP in the playbook execution output. I'll still need to be able to execute shell tasks on the remote instances, like normal. I need to be able to a execute a task before the target registration, I register the result and that determines whether or not I execute a script on the remote target instance and the instance is registered with the target group.

When I try to execute tasks on the remote instance by adding: ```yaml - name: 'check if example file exists' stat: path: /tmp/example-exists when: blitz == "true" register: example_exists_file ``` It checks the local filesystem but shows the instance IP in the playbook execution output. [_I'll still need to be able to execute shell tasks on the remote instances, like normal_](https://gitlab.com/stationgroup/ansible-target-practice/-/issues/1). I need to be able to a execute a task before the target registration, I register the result and that determines whether or not I execute a script on the remote target instance and the instance is registered with the target group.
reel commented 2020-10-29 02:20:36 +00:00 (Migrated from gitlab.com)

requested review from @reel

requested review from @reel
reel commented 2020-10-29 02:20:53 +00:00 (Migrated from gitlab.com)

requested review from @reel

requested review from @reel
reel commented 2020-10-30 01:53:40 +00:00 (Migrated from gitlab.com)

I ended up solving the remote execution part by removing connection: local and using something like delegate_to: 127.0.0.1.

I can fix the remaining minor errors.

I ended up solving the remote execution part by removing `connection: local` and using something like `delegate_to: 127.0.0.1`. I can fix the remaining minor errors.
reel commented 2020-10-30 01:55:27 +00:00 (Migrated from gitlab.com)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/stationgroup/ansible-target-practice/-/merge_requests/1/diffs?diff_id=121376877&start_sha=b295ca88d1d524fd124054cfa06bad34cac62821#8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d_60_60)
reel commented 2020-10-30 01:55:27 +00:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>fb662f2e - fix tag group typo</li></ul> [Compare with previous version](/stationgroup/ansible-target-practice/-/merge_requests/1/diffs?diff_id=121376877&start_sha=b295ca88d1d524fd124054cfa06bad34cac62821)
reel commented 2020-10-30 01:56:43 +00:00 (Migrated from gitlab.com)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/stationgroup/ansible-target-practice/-/merge_requests/1/diffs?diff_id=121376983&start_sha=fb662f2ecf6af5625362ede9294f6499300fad78#a2c6ee2af340a765ae6bf5324f7b7c7eb5208f35_47_47)
reel commented 2020-10-30 01:56:43 +00:00 (Migrated from gitlab.com)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/stationgroup/ansible-target-practice/-/merge_requests/1/diffs?diff_id=121376983&start_sha=fb662f2ecf6af5625362ede9294f6499300fad78#a2c6ee2af340a765ae6bf5324f7b7c7eb5208f35_38_38)
reel commented 2020-10-30 01:56:43 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 8f2d4df3 - fix target_id parameter and state

Compare with previous version

added 1 commit <ul><li>8f2d4df3 - fix target_id parameter and state</li></ul> [Compare with previous version](/stationgroup/ansible-target-practice/-/merge_requests/1/diffs?diff_id=121376983&start_sha=fb662f2ecf6af5625362ede9294f6499300fad78)
reel commented 2020-10-30 01:58:22 +00:00 (Migrated from gitlab.com)

approved this merge request

approved this merge request
reel commented 2020-10-30 01:59:21 +00:00 (Migrated from gitlab.com)

resolved all threads

resolved all threads
reel commented 2020-10-30 01:59:28 +00:00 (Migrated from gitlab.com)

mentioned in commit 2c86950121

mentioned in commit 2c86950121d995f5d238af6d539735569491536b
reel commented 2020-10-30 01:59:47 +00:00 (Migrated from gitlab.com)

assigned to @reel

assigned to @reel
reel commented 2020-10-30 01:59:47 +00:00 (Migrated from gitlab.com)

requested review from @reel

requested review from @reel
vincentvdk commented 2020-10-30 05:45:36 +00:00 (Migrated from gitlab.com)

I'll have a look at it later today

I'll have a look at it later today
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: stationgroup/ansible-target-practice#2
No description provided.