{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/17672","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/17672/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/17672/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/17672/events","html_url":"https://github.com/ansible/ansible/issues/17672","id":178165275,"number":17672,"title":"Per host files","user":{"login":"ohmer1","id":1868995,"avatar_url":"https://avatars.githubusercontent.com/u/1868995?v=3","gravatar_id":"","url":"https://api.github.com/users/ohmer1","html_url":"https://github.com/ohmer1","followers_url":"https://api.github.com/users/ohmer1/followers","following_url":"https://api.github.com/users/ohmer1/following{/other_user}","gists_url":"https://api.github.com/users/ohmer1/gists{/gist_id}","starred_url":"https://api.github.com/users/ohmer1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohmer1/subscriptions","organizations_url":"https://api.github.com/users/ohmer1/orgs","repos_url":"https://api.github.com/users/ohmer1/repos","events_url":"https://api.github.com/users/ohmer1/events{/privacy}","received_events_url":"https://api.github.com/users/ohmer1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-20T20:00:39Z","updated_at":"2016-09-20T20:03:29Z","closed_at":null,"body":"##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Feature Idea\r\n\r\n##### COMPONENT NAME\r\nN/A\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\nansible 2.1.1.0\r\n  config file = /home/me/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### CONFIGURATION\r\nN/A\r\n\r\n##### OS / ENVIRONMENT\r\nN/A\r\n\r\n##### SUMMARY\r\nFor module that work with files (like copy), add a directory in the include path located in _host_files/{{ inventory_hostname}}_. The file is this directory should be included only when there is no other match elsewhere (like in the role).\r\n\r\nIt would be similar with the feature that include variables file located in _host_vars/{{ inventory_hostname}}_.\r\n\r\n##### STEPS TO REPRODUCE\r\nThis example task would copy the file located at _host_files/{{ inventory_hostname}/myapp.crt_ to the remote server because the file is missing from others include path (this is custom or each servers).\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```\r\n- name: Copy certificate file\r\n  copy:\r\n    src=myapp.crt\r\n    dest=/etc/ssl/myapp.crt\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/248417635","html_url":"https://github.com/ansible/ansible/issues/17672#issuecomment-248417635","issue_url":"https://api.github.com/repos/ansible/ansible/issues/17672","id":248417635,"user":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T20:03:29Z","updated_at":"2016-09-20T20:03:29Z","body":"This can easily be done already\r\n```\r\n- name: Copy certificate file\r\n  copy:\r\n    src=host_files/{{inventory_hostname}}/myapp.crt\r\n    dest=/etc/ssl/myapp.crt\r\n```\r\nYou can even use the first_found lookup to establish fallback behavior.\r\n\r\n"}}
{"actor":{"display_login":"bcoca"}}