File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 pre_tasks :
1515 - name : Update apt cache.
1616 apt : update_cache=yes cache_valid_time=600
17- when : ansible_os_family == 'Debian'
17+ when : ansible_facts.os_family == 'Debian'
1818 changed_when : false
1919
2020 roles :
Original file line number Diff line number Diff line change 4545 stat :
4646 path : /etc/pki/tls/certs/localhost.crt
4747 register : localhost_cert
48- when : ansible_distribution_major_version | int >= 8
48+ when : ansible_facts.distribution_major_version | int >= 8
4949
5050- name : Ensure httpd certs are installed (RHEL 8 and later).
5151 command : /usr/libexec/httpd-ssl-gencerts
5252 when :
53- - ansible_distribution_major_version | int >= 8
53+ - ansible_facts.distribution_major_version | int >= 8
5454 - not localhost_cert.stat.exists
Original file line number Diff line number Diff line change 11---
22# Include variables and define needed variables.
33- name : Include OS-specific variables.
4- include_vars : " {{ ansible_os_family }}.yml"
4+ include_vars : " {{ ansible_facts.os_family }}.yml"
55
66- name : Include variables for Amazon Linux.
77 include_vars : " AmazonLinux.yml"
88 when :
9- - ansible_distribution == "Amazon"
10- - ansible_distribution_major_version == "NA"
9+ - ansible_facts.distribution == "Amazon"
10+ - ansible_facts.distribution_major_version == "NA"
1111
1212- name : Define apache_packages.
1313 set_fact :
1414 apache_packages : " {{ __apache_packages | list }}"
1515 when : apache_packages is not defined
1616
1717# Setup/install tasks.
18- - include_tasks : " setup-{{ ansible_os_family }}.yml"
18+ - include_tasks : " setup-{{ ansible_facts.os_family }}.yml"
1919
2020# Figure out what version of Apache is installed.
2121- name : Get installed version of Apache.
3838
3939# Configure Apache.
4040- name : Configure Apache.
41- include_tasks : " configure-{{ ansible_os_family }}.yml"
41+ include_tasks : " configure-{{ ansible_facts.os_family }}.yml"
4242
4343- name : Ensure Apache has selected state and enabled on boot.
4444 service :
You can’t perform that action at this time.
0 commit comments