installation.packages.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. - name: Install the selinux python module
  3. yum: name=libselinux-python state=present
  4. when: ansible_os_family == "RedHat"
  5. tags: [packages,nginx]
  6. - name: Install the epel packages
  7. yum: name=epel-release state=present
  8. when: nginx_is_el|bool
  9. tags: [packages,nginx]
  10. - name: Install the nginx packages
  11. yum: name={{ item }} state=present disablerepo='*' enablerepo={{ "nginx," if nginx_official_repo else "" }}{{ yum_epel_repo }},{{ yum_base_repo }}
  12. with_items: nginx_redhat_pkg
  13. when: nginx_is_el|bool
  14. tags: [packages,nginx]
  15. - name: Install the nginx packages
  16. yum: name={{ item }} state=present
  17. with_items: nginx_redhat_pkg
  18. when: ansible_os_family == "RedHat" and not nginx_is_el|bool
  19. tags: [packages,nginx]
  20. - name: Install the nginx packages
  21. apt: name={{ item }} state=present
  22. with_items: nginx_ubuntu_pkg
  23. environment: "{{ nginx_env }}"
  24. when: ansible_os_family == "Debian"
  25. tags: [packages,nginx]
  26. - name: Install the nginx packages
  27. pkgng: name={{ item }} state=present
  28. with_items: nginx_freebsd_pkg
  29. environment: "{{ nginx_env }}"
  30. when: ansible_os_family == "FreeBSD"
  31. tags: [packages,nginx]
  32. - name: Install the nginx packages
  33. zypper: name={{ item }} state=present
  34. with_items: nginx_suse_pkg
  35. when: ansible_os_family == "Suse"
  36. tags: [packages,nginx]