{"action":"opened","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/30515","labels_url":"https://api.github.com/repos/saltstack/salt/issues/30515/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/30515/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/30515/events","html_url":"https://github.com/saltstack/salt/issues/30515","id":128000901,"number":30515,"title":"jboss7.deployed state is too interwined with Artifactory","user":{"login":"kartsm","id":13040737,"avatar_url":"https://avatars.githubusercontent.com/u/13040737?v=3","gravatar_id":"","url":"https://api.github.com/users/kartsm","html_url":"https://github.com/kartsm","followers_url":"https://api.github.com/users/kartsm/followers","following_url":"https://api.github.com/users/kartsm/following{/other_user}","gists_url":"https://api.github.com/users/kartsm/gists{/gist_id}","starred_url":"https://api.github.com/users/kartsm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kartsm/subscriptions","organizations_url":"https://api.github.com/users/kartsm/orgs","repos_url":"https://api.github.com/users/kartsm/repos","events_url":"https://api.github.com/users/kartsm/events{/privacy}","received_events_url":"https://api.github.com/users/kartsm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-21T19:26:46Z","updated_at":"2016-01-21T19:26:46Z","closed_at":null,"body":"The documentation for ``jboss7.deployed`` is dominated by Artifactory-specific information; it should really focus more on JBoss.  Similarly the code has too much Artifactory in it.\r\n\r\nIs it really that difficult to write two separate but related states to accomplish the same thing?  This seems like a more [DRY](http://c2.com/cgi/wiki?DontRepeatYourself) implementation strategy.\r\n```yaml\r\nartifact_acquired:\r\n  artifactory.downloaded:\r\n   - artifact:\r\n       artifactory_url: http://artifactory.example.invalid/artifactory\r\n       repository: releases\r\n       artifact_id: webapp\r\n       group_id: invalid.example.webapp\r\n       packaging: war\r\n       version: \"3.2.7\"\r\n   - target_file: /tmp/webapp.war\r\n\r\napplication_deployed:\r\n  jboss7.deployed:\r\n    - jboss_config: {{ pillar['jboss'] }}\r\n    - salt_source:\r\n        target_file: /tmp/webapp.war\r\n    - require:\r\n        - artifactory: artifact_acquired\r\n```\r\nNote lack of fetch in ``application_deployed``.  (This might require modification to the Python state code to support.)  That state shouldn't have to care exactly how the deployable artifact arrives, as long as it does arrive.  ``jboss-cli.sh`` doesn't really care either.\r\n\r\nArtifactory is a genuinely useful piece of software but there may be other methods of distributing artifacts to one's JBoss nodes.  The ``jboss7.deployed`` state and associated module functions should not be hostile to alternative methods of artifact distribution, nor should they have to be modified every time an alternative is created."}}