{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/174","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/174/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/174/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/174","id":45566590,"number":174,"title":"lineinfile does not expand \"\\t\" when some conditions are met","user":{"login":"h2suzuki","id":4984414,"avatar_url":"https://avatars.githubusercontent.com/u/4984414?v=3","gravatar_id":"","url":"https://api.github.com/users/h2suzuki","html_url":"https://github.com/h2suzuki","followers_url":"https://api.github.com/users/h2suzuki/followers","following_url":"https://api.github.com/users/h2suzuki/following{/other_user}","gists_url":"https://api.github.com/users/h2suzuki/gists{/gist_id}","starred_url":"https://api.github.com/users/h2suzuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2suzuki/subscriptions","organizations_url":"https://api.github.com/users/h2suzuki/orgs","repos_url":"https://api.github.com/users/h2suzuki/repos","events_url":"https://api.github.com/users/h2suzuki/events{/privacy}","received_events_url":"https://api.github.com/users/h2suzuki/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/affects_1.7","name":"affects_1.7","color":"5319e7"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/waiting_on_maintainer","name":"waiting_on_maintainer","color":"d93f0b"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2014-10-12T00:57:29Z","updated_at":"2016-10-22T10:07:05Z","closed_at":null,"body":"##### Issue Type:\r\n\r\nBug Report\r\n\r\n##### Ansible Version:\r\n\r\n1.7.2\r\n(1.7.1 does not have this issue)\r\n\r\n##### Environment:\r\n\r\nCentOS7 x86_64\r\npip install ansible for 1.7.2\r\nyum install ansible for 1.7.1\r\n\r\n##### Summary:\r\n\r\nlineinfile fails to expand \"\\t\" when the inserted line has \"...'...'...\" type of quoting.\r\n\r\n##### Steps To Reproduce:\r\n\r\nprepare the following playbook and the test data file.\r\n\r\n```yaml\r\n--- # file: lineinfile.yml\r\n\r\n- hosts: all\r\n\r\n  gather_facts: False\r\n\r\n  vars:\r\n    original_file: ./test.txt.org\r\n    target_file: ./test.txt\r\n    fresh_start: yes\r\n\r\n  tasks:\r\n    - name: copy the data file\r\n      copy: src={{ original_file }} dest={{ target_file }} force={{ fresh_start }}\r\n\r\n    - name: insert the line\r\n      lineinfile: dest={{ target_file }} state=present\r\n        insertafter=\"\\t.*this line\"\r\n        line=\"\\ta line with 'tab'\"\r\n        regexp=\"a line with 'tab'\"\r\n```\r\n\r\nHere is test.txt.org.  Note: the indent is by a tab.\r\n\r\n```\r\n# a sample text\r\n\r\n        Insert after this line\r\n        the next line\r\n```\r\n\r\nThen, run the playbook:\r\n\r\n```\r\n$ ansible-playbook -i hosts lineinfile.yml\r\n```\r\n\r\n\r\n##### Expected Results:\r\n\r\nThe target machine should have test.txt in the home directory.\r\n```\r\n# a sample text\r\n\r\n        Insert after this line\r\n        a line with 'tab'\r\n        the next line\r\n```\r\n\r\n##### Actual Results:\r\n\r\nThe two character string \"\\t\" is inserted instead of a tab.\r\n\r\n```\r\n# a sample text\r\n\r\n        Insert after this line\r\n\\ta line with 'tab'\r\n        the next line\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/255519427","html_url":"https://github.com/ansible/ansible-modules-core/issues/174#issuecomment-255519427","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/174","id":255519427,"user":{"login":"ansibot","id":6585283,"avatar_url":"https://avatars.githubusercontent.com/u/6585283?v=3","gravatar_id":"","url":"https://api.github.com/users/ansibot","html_url":"https://github.com/ansibot","followers_url":"https://api.github.com/users/ansibot/followers","following_url":"https://api.github.com/users/ansibot/following{/other_user}","gists_url":"https://api.github.com/users/ansibot/gists{/gist_id}","starred_url":"https://api.github.com/users/ansibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansibot/subscriptions","organizations_url":"https://api.github.com/users/ansibot/orgs","repos_url":"https://api.github.com/users/ansibot/repos","events_url":"https://api.github.com/users/ansibot/events{/privacy}","received_events_url":"https://api.github.com/users/ansibot/received_events","type":"User","site_admin":false},"created_at":"2016-10-22T10:07:05Z","updated_at":"2016-10-22T10:07:05Z","body":"@ansible, ping. This issue is still waiting on your response.\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n<!--- boilerplate: issue_renotify_maintainer --->"}}
{"actor":{"display_login":"ansibot"}}