{"action":"created","issue":{"url":"https://api.github.com/repos/kushaldas/qubes_ansible/issues/13","repository_url":"https://api.github.com/repos/kushaldas/qubes_ansible","labels_url":"https://api.github.com/repos/kushaldas/qubes_ansible/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/kushaldas/qubes_ansible/issues/13/comments","events_url":"https://api.github.com/repos/kushaldas/qubes_ansible/issues/13/events","html_url":"https://github.com/kushaldas/qubes_ansible/issues/13","id":372658273,"node_id":"MDU6SXNzdWUzNzI2NTgyNzM=","number":13,"title":"Detect if a VM is fedora or debian","user":{"login":"micahflee","id":156128,"node_id":"MDQ6VXNlcjE1NjEyOA==","avatar_url":"https://avatars3.githubusercontent.com/u/156128?v=4","gravatar_id":"","url":"https://api.github.com/users/micahflee","html_url":"https://github.com/micahflee","followers_url":"https://api.github.com/users/micahflee/followers","following_url":"https://api.github.com/users/micahflee/following{/other_user}","gists_url":"https://api.github.com/users/micahflee/gists{/gist_id}","starred_url":"https://api.github.com/users/micahflee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micahflee/subscriptions","organizations_url":"https://api.github.com/users/micahflee/orgs","repos_url":"https://api.github.com/users/micahflee/repos","events_url":"https://api.github.com/users/micahflee/events{/privacy}","received_events_url":"https://api.github.com/users/micahflee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-22T19:13:42Z","updated_at":"2018-10-23T16:48:29Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The `createinventory` command makes a nice inventory file of all VMs. However this means it breaks `updates.yaml` example because all templates are in a single group, instead of in separate `fedora_templates` and `debian_templates` groups. This is also true for standalone VMs.\r\n\r\nHow would I go about writing a task that first detects the OS of a host in the inventory, then does one thing if it's fedora and something else if it's debian?"},"comment":{"url":"https://api.github.com/repos/kushaldas/qubes_ansible/issues/comments/432328061","html_url":"https://github.com/kushaldas/qubes_ansible/issues/13#issuecomment-432328061","issue_url":"https://api.github.com/repos/kushaldas/qubes_ansible/issues/13","id":432328061,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjMyODA2MQ==","user":{"login":"kushaldas","id":272303,"node_id":"MDQ6VXNlcjI3MjMwMw==","avatar_url":"https://avatars3.githubusercontent.com/u/272303?v=4","gravatar_id":"","url":"https://api.github.com/users/kushaldas","html_url":"https://github.com/kushaldas","followers_url":"https://api.github.com/users/kushaldas/followers","following_url":"https://api.github.com/users/kushaldas/following{/other_user}","gists_url":"https://api.github.com/users/kushaldas/gists{/gist_id}","starred_url":"https://api.github.com/users/kushaldas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kushaldas/subscriptions","organizations_url":"https://api.github.com/users/kushaldas/orgs","repos_url":"https://api.github.com/users/kushaldas/repos","events_url":"https://api.github.com/users/kushaldas/events{/privacy}","received_events_url":"https://api.github.com/users/kushaldas/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T16:48:29Z","updated_at":"2018-10-23T16:48:29Z","author_association":"OWNER","body":">Or perhaps, maybe a better way to do this, is to make the createinventory command do the detection of VM type and split them into groups based on that time. Like, perhaps it can create these groups:\r\n\r\nWhat about a second command for this detailed `inventory` file?"}}
{"actor":{"display_login":"kushaldas"}}