{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1321","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1321/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1321/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1321/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/1321","id":76091149,"number":1321,"title":"Teach ec2_lc to automatically generate names from a base name","user":{"login":"jsternberg","id":1212129,"avatar_url":"https://avatars.githubusercontent.com/u/1212129?v=3","gravatar_id":"","url":"https://api.github.com/users/jsternberg","html_url":"https://github.com/jsternberg","followers_url":"https://api.github.com/users/jsternberg/followers","following_url":"https://api.github.com/users/jsternberg/following{/other_user}","gists_url":"https://api.github.com/users/jsternberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jsternberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsternberg/subscriptions","organizations_url":"https://api.github.com/users/jsternberg/orgs","repos_url":"https://api.github.com/users/jsternberg/repos","events_url":"https://api.github.com/users/jsternberg/events{/privacy}","received_events_url":"https://api.github.com/users/jsternberg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/cloud","name":"cloud","color":"c7def8"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/feature_idea","name":"feature_idea","color":"006b75"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/P3","name":"P3","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-13T19:13:31Z","updated_at":"2016-05-02T14:02:18Z","closed_at":null,"body":"The ec2_lc module gives us a little bit of difficulty right now because it can't modify a launch configuration. We would like it if the module allowed an option to automatically generate a hash of the module parameters and include it in the launch configuration name. Right now, we have to manually update the uuid like this:\r\n\r\n```\r\n- ec2_lc:\r\n    name: myservice-<hash1>\r\n    state: present\r\n\r\n- ec2_asg:\r\n    launch_config_name: myservice-<hash1>\r\n    replace_all_instances: yes\r\n    state: present\r\n```\r\n\r\nWe'd have to go and replace hash1 with hash2 manually every time we make a change. Sometimes, changes are made implicitly by a variable getting updated somewhere in the system (like a new global AMI).\r\n\r\nI would like to be able to use `register` with `ec2_lc` and then pass the result to `ec2_asg` and have `ec2_lc` automatically determine the name using something like an md5 hash. So I would do:\r\n\r\n```\r\n- ec2_lc:\r\n    name: myservice\r\n    hash_method: md5\r\n    state: present\r\n```\r\n\r\nThen have this create a launch configuration with `myservice-<md5hashofparams>`.\r\n\r\nI'm not sure what the desired method is nor do I know what the argument should be named."},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/216243906","html_url":"https://github.com/ansible/ansible-modules-core/issues/1321#issuecomment-216243906","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1321","id":216243906,"user":{"login":"shawnsi","id":55750,"avatar_url":"https://avatars.githubusercontent.com/u/55750?v=3","gravatar_id":"","url":"https://api.github.com/users/shawnsi","html_url":"https://github.com/shawnsi","followers_url":"https://api.github.com/users/shawnsi/followers","following_url":"https://api.github.com/users/shawnsi/following{/other_user}","gists_url":"https://api.github.com/users/shawnsi/gists{/gist_id}","starred_url":"https://api.github.com/users/shawnsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawnsi/subscriptions","organizations_url":"https://api.github.com/users/shawnsi/orgs","repos_url":"https://api.github.com/users/shawnsi/repos","events_url":"https://api.github.com/users/shawnsi/events{/privacy}","received_events_url":"https://api.github.com/users/shawnsi/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T14:02:18Z","updated_at":"2016-05-02T14:02:18Z","body":"@jsternberg How does my change look?  I'm using it locally to solve some problems."}}