{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/awx/issues/991","repository_url":"https://api.github.com/repos/ansible/awx","labels_url":"https://api.github.com/repos/ansible/awx/issues/991/labels{/name}","comments_url":"https://api.github.com/repos/ansible/awx/issues/991/comments","events_url":"https://api.github.com/repos/ansible/awx/issues/991/events","html_url":"https://github.com/ansible/awx/issues/991","id":288968756,"number":991,"title":"Integer key inside dictionary imported as string when inventory is sourced from a project","user":{"login":"bobsonthegreat","id":6728173,"avatar_url":"https://avatars2.githubusercontent.com/u/6728173?v=4","gravatar_id":"","url":"https://api.github.com/users/bobsonthegreat","html_url":"https://github.com/bobsonthegreat","followers_url":"https://api.github.com/users/bobsonthegreat/followers","following_url":"https://api.github.com/users/bobsonthegreat/following{/other_user}","gists_url":"https://api.github.com/users/bobsonthegreat/gists{/gist_id}","starred_url":"https://api.github.com/users/bobsonthegreat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobsonthegreat/subscriptions","organizations_url":"https://api.github.com/users/bobsonthegreat/orgs","repos_url":"https://api.github.com/users/bobsonthegreat/repos","events_url":"https://api.github.com/users/bobsonthegreat/events{/privacy}","received_events_url":"https://api.github.com/users/bobsonthegreat/received_events","type":"User","site_admin":false},"labels":[{"id":687169246,"url":"https://api.github.com/repos/ansible/awx/labels/component:api","name":"component:api","color":"fbca04","default":false},{"id":719162362,"url":"https://api.github.com/repos/ansible/awx/labels/good%20first%20issue","name":"good first issue","color":"4b1489","default":true},{"id":719162216,"url":"https://api.github.com/repos/ansible/awx/labels/help%20wanted","name":"help wanted","color":"61f235","default":true},{"id":670226707,"url":"https://api.github.com/repos/ansible/awx/labels/state:needs_devel","name":"state:needs_devel","color":"ededed","default":false},{"id":607283748,"url":"https://api.github.com/repos/ansible/awx/labels/type:bug","name":"type:bug","color":"F79F81","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-01-16T16:22:58Z","updated_at":"2018-02-22T21:02:37Z","closed_at":null,"author_association":"NONE","body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n - API\r\n\r\n##### SUMMARY\r\nWhen you have a dictionary defined in your project which has keys that are integers, AWX imports them as strings when using a project as the inventory source.\r\n\r\n##### ENVIRONMENT\r\n* AWX version: 1.0.2-350-gae06cff\r\n* AWX install method: docker on linux\r\n* Ansible version:  2.4.2.0\r\n* Operating System: CentOS 7.4.1708\r\n* Web Browser: Chrome 63.0.3239.132 (Official Build) (64-bit)\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\n1. Create a project in source control containing a dictionary like the following in host_vars/group_vars\r\n    ```yaml\r\n    loader1_var:\r\n      subvar1:\r\n        1:\r\n          - foo\r\n        2:\r\n          - bar\r\n    ```\r\n2. Add the project in AWX and sync\r\n3. Create an inventory that uses this project as a source and sync\r\n\r\n\r\n##### EXPECTED RESULTS\r\n\r\nDictionary is imported as laid out in the source file with the keys as integers:\r\n\r\n```yaml\r\nloader1_var:\r\n  subvar1:\r\n    1:\r\n      - foo\r\n    2:\r\n      - bar\r\n```\r\n\r\n##### ACTUAL RESULTS\r\n\r\nDictionary is imported with the keys converted to strings:\r\n\r\n```yaml\r\nloader1_var:\r\n  subvar1:\r\n    '1':\r\n      - foo\r\n    '2':\r\n      - bar\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/awx/issues/comments/367821075","html_url":"https://github.com/ansible/awx/issues/991#issuecomment-367821075","issue_url":"https://api.github.com/repos/ansible/awx/issues/991","id":367821075,"user":{"login":"AlanCoding","id":1385596,"avatar_url":"https://avatars3.githubusercontent.com/u/1385596?v=4","gravatar_id":"","url":"https://api.github.com/users/AlanCoding","html_url":"https://github.com/AlanCoding","followers_url":"https://api.github.com/users/AlanCoding/followers","following_url":"https://api.github.com/users/AlanCoding/following{/other_user}","gists_url":"https://api.github.com/users/AlanCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/AlanCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlanCoding/subscriptions","organizations_url":"https://api.github.com/users/AlanCoding/orgs","repos_url":"https://api.github.com/users/AlanCoding/repos","events_url":"https://api.github.com/users/AlanCoding/events{/privacy}","received_events_url":"https://api.github.com/users/AlanCoding/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T21:02:37Z","updated_at":"2018-02-22T21:02:37Z","author_association":"MEMBER","body":"No, that's a special script for importing inventory from another server.\r\n\r\nhttps://github.com/ansible/awx/blob/1ccdb305e3497f1958fa0229bf82edc262686836/awx/main/management/commands/inventory_import.py\r\n\r\nThis would require finding the `ansible-inventory` use there, change it to output YAML format, and read it as YAML.\r\n\r\nNot sure if this breaks anything else unexpected, might be good to ping the Ansible core mailing list about that. They are more savvy about JSON vs. YAML than I am."}}
{"actor":{"display_login":"AlanCoding"}}