Skip to content

Commit 861a1c9

Browse files
committed
Update install-distribution.yml
1 parent 167cbc2 commit 861a1c9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tasks/opensource/install-distribution.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,14 @@
3131
- ansible_facts['distribution'] == "CentOS"
3232
- ansible_facts['distribution_major_version'] is version('7', '==')
3333

34-
- name: (Amazon Linux) {{ nginx_setup | capitalize }} NGINX from Amazon's extras package repository
35-
ansible.builtin.command: amazon-linux-extras {{ (nginx_setup == 'uninstall') | ternary('remove', 'install') }} -y nginx1
34+
- name: (Amazon Linux) Enable the NGINX Amazon extras package repository
35+
ansible.builtin.command: amazon-linux-extras enable nginx1
3636
args:
37-
creates: "{{ (nginx_setup == 'uninstall') | ternary(omit, '/sbin/nginx') }}"
38-
removes: "{{ (nginx_setup == 'uninstall') | ternary('/sbin/nginx', omit) }}"
37+
creates: /usr/sbin/nginx
3938
when: ansible_facts['distribution'] == "Amazon"
40-
notify: (Handler) Run NGINX
4139

4240
- name: "{{ nginx_setup | capitalize }} NGINX from the distribution's package repository"
4341
ansible.builtin.package:
4442
name: nginx{{ nginx_version | default('') }}
4543
state: "{{ nginx_state }}"
46-
when: ansible_facts['distribution'] != "Amazon"
4744
notify: (Handler) Run NGINX

0 commit comments

Comments
 (0)