{"action":"created","issue":{"url":"https://api.github.com/repos/someara/line-cookbook/issues/28","labels_url":"https://api.github.com/repos/someara/line-cookbook/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/someara/line-cookbook/issues/28/comments","events_url":"https://api.github.com/repos/someara/line-cookbook/issues/28/events","html_url":"https://github.com/someara/line-cookbook/issues/28","id":76851774,"number":28,"title":"replace_or_add failing on XML document","user":{"login":"hulu1522","id":8116850,"avatar_url":"https://avatars.githubusercontent.com/u/8116850?v=3","gravatar_id":"","url":"https://api.github.com/users/hulu1522","html_url":"https://github.com/hulu1522","followers_url":"https://api.github.com/users/hulu1522/followers","following_url":"https://api.github.com/users/hulu1522/following{/other_user}","gists_url":"https://api.github.com/users/hulu1522/gists{/gist_id}","starred_url":"https://api.github.com/users/hulu1522/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hulu1522/subscriptions","organizations_url":"https://api.github.com/users/hulu1522/orgs","repos_url":"https://api.github.com/users/hulu1522/repos","events_url":"https://api.github.com/users/hulu1522/events{/privacy}","received_events_url":"https://api.github.com/users/hulu1522/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-15T20:40:17Z","updated_at":"2015-05-15T21:52:03Z","closed_at":null,"body":"I am using this resource on a machine.  It will find the line it needs on the first run and replaces it correctly.  Every run after that fails because it can't detect that the line was already replaces so it appends it to the end of the document.\r\n\r\nCODE:\r\n```ruby\r\nreplace_or_add \"sso crowd auth\" do\r\n  path \"#{node[\"confluence\"][\"install_dir\"]}/confluence/confluence/WEB-INF/classes/seraph-config.xml\"\r\n  pattern %Q[<!-- <authenticator class=\"com.atlassian.confluence.user.ConfluenceCrowdSSOAuthenticator\"/> -->]\r\n  line %Q[<authenticator class=\"com.atlassian.confluence.user.ConfluenceCrowdSSOAuthenticator\"/>]\r\n  notifies :restart, \"service[#{service_name}]\", :delayed\r\nend\r\n```\r\n\r\nDEBUG OUTPUT:\r\n```\r\n* replace_or_add[sso crowd auth] action edit[2015-05-15T20:30:39+00:00] INFO: Processing replace_or_add[sso crowd auth] action edit (tcn_atlassian::confluence line 112)\r\n[2015-05-15T20:30:39+00:00] DEBUG: providers for generic replace_or_add resource enabled on node include: []\r\n[2015-05-15T20:30:39+00:00] DEBUG: providers that refused resource replace_or_add[sso crowd auth] were: []\r\n[2015-05-15T20:30:39+00:00] DEBUG: providers that support resource replace_or_add[sso crowd auth] include: []\r\n[2015-05-15T20:30:39+00:00] DEBUG: no providers supported the resource, falling back to enabled handlers\r\n[2015-05-15T20:30:39+00:00] DEBUG: providers that survived replacement include: []\r\n[2015-05-15T20:30:39+00:00] DEBUG: dynamic provider resolver FAILED to resolve a provider\r\n```\r\n\r\nIs there any reason why it is not finding the line and reporting it as \"up to date\"?  "},"comment":{"url":"https://api.github.com/repos/someara/line-cookbook/issues/comments/102533382","html_url":"https://github.com/someara/line-cookbook/issues/28#issuecomment-102533382","issue_url":"https://api.github.com/repos/someara/line-cookbook/issues/28","id":102533382,"user":{"login":"hulu1522","id":8116850,"avatar_url":"https://avatars.githubusercontent.com/u/8116850?v=3","gravatar_id":"","url":"https://api.github.com/users/hulu1522","html_url":"https://github.com/hulu1522","followers_url":"https://api.github.com/users/hulu1522/followers","following_url":"https://api.github.com/users/hulu1522/following{/other_user}","gists_url":"https://api.github.com/users/hulu1522/gists{/gist_id}","starred_url":"https://api.github.com/users/hulu1522/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hulu1522/subscriptions","organizations_url":"https://api.github.com/users/hulu1522/orgs","repos_url":"https://api.github.com/users/hulu1522/repos","events_url":"https://api.github.com/users/hulu1522/events{/privacy}","received_events_url":"https://api.github.com/users/hulu1522/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T21:52:03Z","updated_at":"2015-05-15T21:52:03Z","body":"That was not the issue.  It compiled correctly both ways and still is not detecting the \"line\" portion correctly.  It finds the \"pattern\" just fine the first time and replaces it correctly.  On the second converge it fails to recognize that the \"line\" is already in the file.\r\n\r\nCould the editor be returning some strange characters?  I'm using this on a SmartOS machine."}}