{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/42476","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/42476/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/42476/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/42476/events","html_url":"https://github.com/ansible/ansible/issues/42476","id":339231294,"node_id":"MDU6SXNzdWUzMzkyMzEyOTQ=","number":42476,"title":"k8s module's `src` parameter does not read from local filesystem","user":{"login":"bauerd","id":994272,"node_id":"MDQ6VXNlcjk5NDI3Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/994272?v=4","gravatar_id":"","url":"https://api.github.com/users/bauerd","html_url":"https://github.com/bauerd","followers_url":"https://api.github.com/users/bauerd/followers","following_url":"https://api.github.com/users/bauerd/following{/other_user}","gists_url":"https://api.github.com/users/bauerd/gists{/gist_id}","starred_url":"https://api.github.com/users/bauerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bauerd/subscriptions","organizations_url":"https://api.github.com/users/bauerd/orgs","repos_url":"https://api.github.com/users/bauerd/repos","events_url":"https://api.github.com/users/bauerd/events{/privacy}","received_events_url":"https://api.github.com/users/bauerd/received_events","type":"User","site_admin":false},"labels":[{"id":835286067,"node_id":"MDU6TGFiZWw4MzUyODYwNjc=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.6","name":"affects_2.6","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":849212023,"node_id":"MDU6TGFiZWw4NDkyMTIwMjM=","url":"https://api.github.com/repos/ansible/ansible/labels/docs","name":"docs","color":"0052cc","default":false},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":383076471,"node_id":"MDU6TGFiZWwzODMwNzY0NzE=","url":"https://api.github.com/repos/ansible/ansible/labels/python3","name":"python3","color":"fbca04","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-07-08T14:43:16Z","updated_at":"2018-08-08T12:03:06Z","closed_at":null,"author_association":"NONE","body":"<!---\r\nVerify first that your issue/request is not already reported on GitHub.\r\nTHIS FORM WILL BE READ BY A MACHINE, COMPLETE ALL SECTIONS AS DESCRIBED.\r\nAlso test if the latest release, and devel branch are affected too.\r\nALWAYS add information AFTER (OUTSIDE) these html comments.\r\nOtherwise it may end up being automatically closed by our bot. -->\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\n\r\nThe `k8s` module's `src` parameter is supposed to read from the local file system:\r\n> Reads from the local file system ([Docs » k8s - Manage Kubernetes (K8s) objects](https://docs.ansible.com/ansible/latest/modules/k8s_module.html))\r\n\r\n… but the path passed as the `src` value is tried to be read on the remote machine.\r\n\r\n##### ISSUE TYPE\r\n - Documentation Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Insert, BELOW THIS COMMENT, the name of the module, plugin, task or feature.\r\nDo not include extra details here, e.g. \"vyos_command\" not \"the network module vyos_command\" or the full path-->\r\nk8s\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste, BELOW THIS COMMENT, verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\nansible 2.6.1\r\n  config file = None\r\n  configured module search path = ['/Users/bauerd/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible\r\n  executable location = /usr/local/bin/ansible\r\n  python version = 3.6.5 (default, Apr 25 2018, 14:26:36) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]\r\n```\r\n\r\n##### CONFIGURATION\r\n<!--- If using Ansible 2.4 or above, paste, BELOW THIS COMMENT, the results of \"ansible-config dump --only-changed\"\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).-->\r\n\r\nansible.cfg:\r\n\r\n```\r\n[defaults]\r\nhost_key_checking = False\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\n<!--- Mention, BELOW THIS COMMENT, the OS you are running Ansible from, and the OS you are\r\nmanaging, or say \"N/A\" for anything that is not platform-specific.\r\nAlso mention the specific version of what you are trying to control,\r\ne.g. if this is a network bug the version of firmware on the network device.-->\r\n\r\nDarwin abacus.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64\r\n\r\n##### STEPS TO REPRODUCE\r\n<!--- For bugs, show exactly how to reproduce the problem, using a minimal test-case.\r\nFor new features, show how the feature would be used. -->\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```yaml\r\n- name: Manage some Kubernetes object\r\n  k8s:\r\n    state: present\r\n    src: /path/to/local/file\r\n```\r\n\r\n<!--- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\nFile is read from local file system.\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\nFile is read from remote file system.\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\n…\r\nError accessing $SRC. Does the file exist?\r\n…\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/411381680","html_url":"https://github.com/ansible/ansible/issues/42476#issuecomment-411381680","issue_url":"https://api.github.com/repos/ansible/ansible/issues/42476","id":411381680,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTM4MTY4MA==","user":{"login":"willthames","id":391807,"node_id":"MDQ6VXNlcjM5MTgwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/391807?v=4","gravatar_id":"","url":"https://api.github.com/users/willthames","html_url":"https://github.com/willthames","followers_url":"https://api.github.com/users/willthames/followers","following_url":"https://api.github.com/users/willthames/following{/other_user}","gists_url":"https://api.github.com/users/willthames/gists{/gist_id}","starred_url":"https://api.github.com/users/willthames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willthames/subscriptions","organizations_url":"https://api.github.com/users/willthames/orgs","repos_url":"https://api.github.com/users/willthames/repos","events_url":"https://api.github.com/users/willthames/events{/privacy}","received_events_url":"https://api.github.com/users/willthames/received_events","type":"User","site_admin":false},"created_at":"2018-08-08T12:03:06Z","updated_at":"2018-08-08T12:03:06Z","author_association":"CONTRIBUTOR","body":"@towolf you can do\r\n\r\n``` \r\nk8s:\r\n  definition: \"{{ item }}\"\r\nloop: \"{{ lookup('template', 'path/to/template.yml').split('\\n---\\n')|map('from_yaml')|select('ne', None)|list }}\"\r\n```\r\n"}}
{"actor":{"display_login":"willthames"}}