{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3453","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3453/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3453/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3453/events","html_url":"https://github.com/ansible/ansible-modules-core/pull/3453","id":149080562,"number":3453,"title":"Add way to specify environment","user":{"login":"jhutar","id":3397250,"avatar_url":"https://avatars.githubusercontent.com/u/3397250?v=3","gravatar_id":"","url":"https://api.github.com/users/jhutar","html_url":"https://github.com/jhutar","followers_url":"https://api.github.com/users/jhutar/followers","following_url":"https://api.github.com/users/jhutar/following{/other_user}","gists_url":"https://api.github.com/users/jhutar/gists{/gist_id}","starred_url":"https://api.github.com/users/jhutar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhutar/subscriptions","organizations_url":"https://api.github.com/users/jhutar/orgs","repos_url":"https://api.github.com/users/jhutar/repos","events_url":"https://api.github.com/users/jhutar/events{/privacy}","received_events_url":"https://api.github.com/users/jhutar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/feature_pull_request","name":"feature_pull_request","color":"009800"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/shipit","name":"shipit","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-04-18T08:31:02Z","updated_at":"2016-07-13T11:34:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/3453","html_url":"https://github.com/ansible/ansible-modules-core/pull/3453","diff_url":"https://github.com/ansible/ansible-modules-core/pull/3453.diff","patch_url":"https://github.com/ansible/ansible-modules-core/pull/3453.patch"},"body":"##### ISSUE TYPE\r\n - Feature Pull Request\r\n\r\n##### COMPONENT NAME\r\npackaging/os/redhat_subscription\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 1.9.4\r\n  configured module search path = None\r\n```\r\n\r\n##### SUMMARY\r\nWhen I have attempted to use redhat_subscription against Satellite 6.x (which requires environment to be specified and if not provided on subscription-manager command-line, it asks for it), it hanged forever (I guess that subscription-manager was waiting for input on which environment to use).\r\n\r\nI have just added `environment` option which allows you to specify the value. I have basically duplicated what I have seen in commit which added `org_id`.\r\n\r\nNote that to be able to register against Satellite 6.x, you need to install `http://{{ sat_server }}/pub/katello-ca-consumer-latest.noarch.rpm` first which configures stuff and setup Satellite's CA certificate.\r\n\r\n```\r\n  - name: \"Install katello-ca-consumer from Satellite\"\r\n    yum:\r\n      name=\"http://{{ sat_server }}/pub/katello-ca-consumer-latest.noarch.rpm\"\r\n      state=present\r\n  - name: \"Register to Satelite\"\r\n    redhat_subscription:\r\n      state=present\r\n      username=\"{{ sat_user }}\"\r\n      password=\"{{ sat_pass }}\"\r\n      autosubscribe=true\r\n      environment=Library\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/232329739","html_url":"https://github.com/ansible/ansible-modules-core/pull/3453#issuecomment-232329739","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3453","id":232329739,"user":{"login":"jhutar","id":3397250,"avatar_url":"https://avatars.githubusercontent.com/u/3397250?v=3","gravatar_id":"","url":"https://api.github.com/users/jhutar","html_url":"https://github.com/jhutar","followers_url":"https://api.github.com/users/jhutar/followers","following_url":"https://api.github.com/users/jhutar/following{/other_user}","gists_url":"https://api.github.com/users/jhutar/gists{/gist_id}","starred_url":"https://api.github.com/users/jhutar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhutar/subscriptions","organizations_url":"https://api.github.com/users/jhutar/orgs","repos_url":"https://api.github.com/users/jhutar/repos","events_url":"https://api.github.com/users/jhutar/events{/privacy}","received_events_url":"https://api.github.com/users/jhutar/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T11:34:55Z","updated_at":"2016-07-13T11:34:55Z","body":"Thanks!"}}
{"actor":{"display_login":"jhutar"}}