Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
pre_tasks:
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == 'Debian'
when: ansible_facts.os_family == 'Debian'
changed_when: false

roles:
Expand Down
4 changes: 2 additions & 2 deletions tasks/configure-RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
stat:
path: /etc/pki/tls/certs/localhost.crt
register: localhost_cert
when: ansible_distribution_major_version | int >= 8
when: ansible_facts.distribution_major_version | int >= 8

- name: Ensure httpd certs are installed (RHEL 8 and later).
command: /usr/libexec/httpd-ssl-gencerts
when:
- ansible_distribution_major_version | int >= 8
- ansible_facts.distribution_major_version | int >= 8
- not localhost_cert.stat.exists
10 changes: 5 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
# Include variables and define needed variables.
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
include_vars: "{{ ansible_facts.os_family }}.yml"

- name: Include variables for Amazon Linux.
include_vars: "AmazonLinux.yml"
when:
- ansible_distribution == "Amazon"
- ansible_distribution_major_version == "NA"
- ansible_facts.distribution == "Amazon"
- ansible_facts.distribution_major_version == "NA"

- name: Define apache_packages.
set_fact:
apache_packages: "{{ __apache_packages | list }}"
when: apache_packages is not defined

# Setup/install tasks.
- include_tasks: "setup-{{ ansible_os_family }}.yml"
- include_tasks: "setup-{{ ansible_facts.os_family }}.yml"

# Figure out what version of Apache is installed.
- name: Get installed version of Apache.
Expand All @@ -38,7 +38,7 @@

# Configure Apache.
- name: Configure Apache.
include_tasks: "configure-{{ ansible_os_family }}.yml"
include_tasks: "configure-{{ ansible_facts.os_family }}.yml"

- name: Ensure Apache has selected state and enabled on boot.
service:
Expand Down
Loading