File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 31
31
- ansible_facts['distribution'] == "CentOS"
32
32
- ansible_facts['distribution_major_version'] is version('7', '==')
33
33
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
36
36
args :
37
- creates : " {{ (nginx_setup == 'uninstall') | ternary(omit, '/sbin/nginx') }}"
38
- removes : " {{ (nginx_setup == 'uninstall') | ternary('/sbin/nginx', omit) }}"
37
+ creates : /usr/sbin/nginx
39
38
when : ansible_facts['distribution'] == "Amazon"
40
- notify : (Handler) Run NGINX
41
39
42
40
- name : " {{ nginx_setup | capitalize }} NGINX from the distribution's package repository"
43
41
ansible.builtin.package :
44
42
name : nginx{{ nginx_version | default('') }}
45
43
state : " {{ nginx_state }}"
46
- when : ansible_facts['distribution'] != "Amazon"
47
44
notify : (Handler) Run NGINX
You can’t perform that action at this time.
0 commit comments