Created
January 9, 2018 21:15
-
-
Save anonymous/b855e8a5d2a51996e5bf70fbe05d7b44 to your computer and use it in GitHub Desktop.
Why is file.managed not seeing a match in source_hash?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# state | |
{% from "apache/map.jinja" import apache with context %} | |
include: | |
- apache | |
{% if grains['os_family']=='RedHat' %} | |
# Download mod_jk installation media & verify MD5 | |
{% set httpd_version = apache.version.split('.') %} | |
{% set httpd_major_version = httpd_version[0]|int %} | |
{% set httpd_minor_version = httpd_version[1]|int %} | |
{% set mod_jk = salt.pillar.get('apache:mod_jk',{}) %} | |
mod_jk_download: | |
file.managed: | |
- name: /usr/lib64/httpd/modules/mod_jk.so | |
{% if httpd_minor_version <= 0 %} | |
- source: http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-{{ mod_jk.version }}/x86_64/mod_jk-{{ mod_jk.version }}-httpd-2.0.x.so | |
# - source_hash: http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-{{ mod_jk.version }}/x86_64/mod_jk-{{ mod_jk.version }}-httpd-2.0.x.so.md5 | |
{% elif httpd_minor_version > 0 and httpd_minor_version <= 2 %} | |
- source: http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-{{ mod_jk.version }}/x86_64/mod_jk-{{ mod_jk.version }}-httpd-2.2.x.so | |
# - source_hash: http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-{{ mod_jk.version }}/x86_64/mod_jk-{{ mod_jk.version }}-httpd-2.2.x.so.md5 | |
{% endif %} | |
- user: root | |
- group: root | |
- mode: 755 | |
# rendered urls | |
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.31/x86_64/mod_jk-1.2.31-httpd-2.2.x.so | |
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.31/x86_64/mod_jk-1.2.31-httpd-2.2.x.so.md5 | |
# command line output | |
schemanic@OTWKLT0049:~/Downloads$ ls mod* | |
mod_jk-1.2.31-httpd-2.2.x.so mod_jk-1.2.31-httpd-2.2.x.so.md5 | |
schemanic@OTWKLT0049:~/Downloads$ md5sum mod_jk-1.2.31-httpd-2.2.x.so | |
1f43c9bd5985493aa5f5941980f20a41 mod_jk-1.2.31-httpd-2.2.x.so | |
schemanic@OTWKLT0049:~/Downloads$ cat mod_jk-1.2.31-httpd-2.2.x.so.md5 | |
1f43c9bd5985493aa5f5941980f20a41 *mod_jk-1.2.31-httpd-2.2.x.so | |
# pillar data | |
apache: | |
mod_jk: | |
version: 1.2.31 | |
workers_file: /etc/httpd/conf/workers.properties | |
shm_file: /var/log/httpd/mod_jk.shm | |
log_file: /var/log/httpd/mod_jk.log | |
log_level: info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment