nginx-official-repo.yml 678 B

123456789101112131415161718
  1. ---
  2. - name: Ensure APT official nginx key
  3. apt_key: url=http://nginx.org/keys/nginx_signing.key
  4. tags: [packages,nginx]
  5. when: ansible_os_family == 'Debian'
  6. - name: Ensure APT official nginx repository
  7. apt_repository: repo="deb http://nginx.org/packages/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} nginx"
  8. tags: [packages,nginx]
  9. when: ansible_os_family == 'Debian'
  10. - name: Ensure RPM official nginx key
  11. rpm_key: key=http://nginx.org/keys/nginx_signing.key
  12. when: ansible_os_family == 'RedHat'
  13. - name: Ensure YUM official nginx repository
  14. template: src=nginx.repo.j2 dest=/etc/yum.repos.d/nginx.repo
  15. when: ansible_os_family == 'RedHat'