Issue #156: Fix some Ansible Lint issues.

This commit is contained in:
Jeff Geerling 2018-09-25 22:19:58 -05:00
parent c71fb7f204
commit afb02c39ca
4 changed files with 16 additions and 13 deletions

View file

@ -26,14 +26,14 @@ apache_allow_override: "All"
apache_options: "-Indexes +FollowSymLinks" apache_options: "-Indexes +FollowSymLinks"
apache_vhosts_ssl: [] apache_vhosts_ssl: []
# Additional properties: # Additional properties:
# 'serveradmin, serveralias, allow_override, options, extra_parameters'. # 'serveradmin, serveralias, allow_override, options, extra_parameters'.
# - servername: "local.dev", # - servername: "local.dev",
# documentroot: "/var/www/html", # documentroot: "/var/www/html",
# certificate_file: "/path/to/certificate.crt", # certificate_file: "/path/to/certificate.crt",
# certificate_key_file: "/path/to/certificate.key", # certificate_key_file: "/path/to/certificate.key",
# # Optional. # # Optional.
# certificate_chain_file: "/path/to/certificate_chain.crt" # certificate_chain_file: "/path/to/certificate_chain.crt"
apache_ignore_missing_ssl_certificate: true apache_ignore_missing_ssl_certificate: true

View file

@ -34,4 +34,4 @@ galaxy_info:
- webserver - webserver
- html - html
allow_duplicates: yes allow_duplicates: true

View file

@ -48,7 +48,8 @@
- name: Remove default vhost in sites-enabled. - name: Remove default vhost in sites-enabled.
file: file:
path: "{{ apache_conf_path }}/sites-enabled/{{ apache_default_vhost_filename }}" path: >-
"{{ apache_conf_path }}/sites-enabled/{{ apache_default_vhost_filename }}"
state: absent state: absent
notify: restart apache notify: restart apache
when: apache_remove_default_vhost when: apache_remove_default_vhost

View file

@ -5,7 +5,9 @@
- name: Include variables for Amazon Linux. - name: Include variables for Amazon Linux.
include_vars: "AmazonLinux.yml" include_vars: "AmazonLinux.yml"
when: ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA" when:
- ansible_distribution == "Amazon"
- ansible_distribution_major_version == "NA"
- name: Define apache_packages. - name: Define apache_packages.
set_fact: set_fact:
@ -19,7 +21,7 @@
- name: Get installed version of Apache. - name: Get installed version of Apache.
command: "{{ apache_daemon_path }}{{ apache_daemon }} -v" command: "{{ apache_daemon_path }}{{ apache_daemon }} -v"
changed_when: false changed_when: false
check_mode: no check_mode: false
register: _apache_version register: _apache_version
- name: Create apache_version variable. - name: Create apache_version variable.
@ -42,4 +44,4 @@
service: service:
name: "{{ apache_service }}" name: "{{ apache_service }}"
state: "{{ apache_state }}" state: "{{ apache_state }}"
enabled: yes enabled: true