{"action":"closed","number":14290,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/14290","id":58154637,"html_url":"https://github.com/ansible/ansible/pull/14290","diff_url":"https://github.com/ansible/ansible/pull/14290.diff","patch_url":"https://github.com/ansible/ansible/pull/14290.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/14290","number":14290,"state":"closed","locked":false,"title":"Stable 2.0: suggestions for improvement","user":{"login":"cazorla19","id":14975946,"avatar_url":"https://avatars.githubusercontent.com/u/14975946?v=3","gravatar_id":"","url":"https://api.github.com/users/cazorla19","html_url":"https://github.com/cazorla19","followers_url":"https://api.github.com/users/cazorla19/followers","following_url":"https://api.github.com/users/cazorla19/following{/other_user}","gists_url":"https://api.github.com/users/cazorla19/gists{/gist_id}","starred_url":"https://api.github.com/users/cazorla19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazorla19/subscriptions","organizations_url":"https://api.github.com/users/cazorla19/orgs","repos_url":"https://api.github.com/users/cazorla19/repos","events_url":"https://api.github.com/users/cazorla19/events{/privacy}","received_events_url":"https://api.github.com/users/cazorla19/received_events","type":"User","site_admin":false},"body":"Last 3 days I tested my own [roles](https://github.com/cazorla19/ansible_play) and got much more acknowledge about Ansible. Many things are great, but also this product has places to improve. Here are my ideas. Unfortunately, I'm not a developer and have no idea about possibility of solution. But if it's possible - that's would be great to get it.\r\n\r\n1) Templates inside of tasks name.\r\nIt's going to be eaesier for other Linux-systems combination. Now what I have to do for proper Apache installation:\r\n```\r\n- name: avoid services collision [CentOS/Red Hat]\r\n  yum: name=nginx state=absent\r\n  when: ansible_distribution == \"CentOS\" or ansible_distribution == \"Red Hat Enterprise Linux\"\r\n  tags: remove\r\n\r\n- name: avoid services collision [Debian/Ubuntu]\r\n  apt: name=nginx state=absent\r\n  when: ansible_distribution == \"Debian\" or ansible_distribution == \"Ubuntu\"\r\n  tags: remove\r\n\r\n- name: install apache [CentOS/Red Hat]\r\n  yum: name=httpd state=latest\r\n  when: ansible_distribution == \"CentOS\" or ansible_distribution == \"Red Hat Enterprise Linux\"\r\n  tags: install\r\n\r\n- name: install apache [Debian/Ubuntu]\r\n  apt: name=apache2 state=latest\r\n  when: ansible_distribution == \"Debian\" or ansible_distribution == \"Ubuntu\"\r\n  tags: install\r\n```\r\nHow it could be:\r\n```\r\n- name: avoid services collision\r\n  {{ package_manager }}: name=nginx state=absent\r\n  tags: remove\r\n\r\n- name: install apache\r\n  {{ package_manager }}: name=httpd state=latest\r\n  tags: install\r\n```\r\nAnd, of course, assign `package_manager` variable in vars file.\r\n\r\n2) Conditionals inside of vars_file.\r\nThe same reason. I forced compared Debian/Ubuntu customization with CentOS: there is a big difference in daemons name, groups name and something like that. What if we could indicate one bunch of variables for one kind of distro and another bunch for another distro? For instance:\r\n```\r\n---\r\n[block1]\r\n   apache_daemon: apache2\r\n   apache_root_dir: /etc/apache2\r\n   apache_modules: /etc/apache2/mods_enabled\r\n   apache_config: /etc/apache2/apache2.conf\r\nwhen: ansible_distribution == \"Ubuntu\"\r\n\r\n[block1]\r\n   apache_daemon: apache2\r\n   apache_root_dir: /etc/httpd\r\n   apache_modules: /etc/httpd/conf.d\r\n   apache_config: /etc/httpd/conf/httpd.conf\r\nwhen: ansible_distribution == \"CentOS\"\r\n```\r\n3) New correct \"make\" module for builds.\r\nMay be I'm mistaken but I don't see favourable module for compilations like \"make\". I mean creation of myriad files like it's going in our host system, when we build any software from sources. With command module and creates argument I can create one file/directory, but just one. That's not enough. For instance:\r\n```\r\n - name: compile ffmpeg\r\n   command: \"{{ item }}\" \r\n   args:\r\n     chdir: \"/opt/ffmpeg\" \r\n     creates: \"/home/user/ffmpeg_build\"\r\n   with_items:\r\n     - PKG_CONFIG_PATH=\"{{ ffmpeg_lib_dir }}/pkgconfig\" ./configure --prefix=\"{{ ffmpeg_build_dir }}\" --extra-cflags=\"-I{{ ffmpeg_build_dir }}/include\" --extra-ldflags=\"-L{{ ffmpeg_lib_dir }}\" --bindir=\"{{ ffmpeg_bin_dir }}\" --pkg-config-flags=\"--static\" --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libfontconfig --enable-libfribidi --enable-libx264\r\n     - make\r\n     - make install\r\n     - make distclean\r\n   tags: ffmpeg\r\n```\r\nThis role creates one directory during the compilation (/home/user/ffmpeg_build), but only one! The good idea would be different module that can deal with multiple files creation.\r\n\r\nThanks for attention.","created_at":"2016-02-03T15:41:42Z","updated_at":"2016-02-03T16:04:29Z","closed_at":"2016-02-03T16:04:29Z","merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/14290/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/14290/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/14290/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/901beeec55f4919031930fd12a05ea994ceea806","head":{"label":"ansible:stable-2.0","ref":"stable-2.0","sha":"901beeec55f4919031930fd12a05ea994ceea806","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":3638964,"name":"ansible","full_name":"ansible/ansible","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible/deployments","created_at":"2012-03-06T14:58:02Z","updated_at":"2016-02-03T16:03:29Z","pushed_at":"2016-02-03T15:55:42Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"http://ansible.com/","size":53326,"stargazers_count":15145,"watchers_count":15145,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4464,"mirror_url":null,"open_issues_count":1141,"forks":4464,"open_issues":1141,"watchers":15145,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"4f93b17c5412344f7373612932d8f74bcd7c2018","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":3638964,"name":"ansible","full_name":"ansible/ansible","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible/deployments","created_at":"2012-03-06T14:58:02Z","updated_at":"2016-02-03T16:03:29Z","pushed_at":"2016-02-03T15:55:42Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"http://ansible.com/","size":53326,"stargazers_count":15145,"watchers_count":15145,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4464,"mirror_url":null,"open_issues_count":1141,"forks":4464,"open_issues":1141,"watchers":15145,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/14290"},"html":{"href":"https://github.com/ansible/ansible/pull/14290"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/14290"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/14290/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/14290/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/14290/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/901beeec55f4919031930fd12a05ea994ceea806"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":1,"review_comments":0,"commits":503,"additions":4711,"deletions":1828,"changed_files":247}}