Я пытаюсь установить apache модули на CentOS 8.1. У меня есть книга игр, которая работает для Ubuntu и мне нужны те же задачи в CentOS.
vars:
libs:
- apache2
- libapache2-mod-php
- libapache2-mod-jk
- libapache2-mod-rpaf
- libapache2-mod-geoip
- php-curl
apt:
name: "{{ libs }}"
state: present
install_recommends: yes
Я установил httpd и php в своей системе.
- name: Install apache2 on CentOS
vars:
libs:
- httpd
- httpd-devel
- php
- php-curl
yum:
name: "{{ libs }}"
state: present
when: ansible_distribution == "CentOS"
Я не знать, каковы эквиваленты модов для тех, которые отсутствуют. Это модули apache, которые мне нужно установить.
- name: Set modules
apache2_module:
name: "{{ item }}"
state: present
with_items:
- alias
- authz_host
- autoindex
- deflate
- dir
- env
- expires
- headers
- jk
- mime
- negotiation
- php7.2
- proxy
- proxy_http
- rewrite
- rpaf
- setenvif
- ssl
- filter
Вывод:
ok: [node1] => (item=alias)
ok: [node1] => (item=authz_host)
ok: [node1] => (item=autoindex)
ok: [node1] => (item=deflate)
ok: [node1] => (item=dir)
ok: [node1] => (item=env)
ok: [node1] => (item=expires)
ok: [node1] => (item=headers)
failed: [node1] (item=jk) => {"ansible_loop_var": "item", "changed": false, "item": "jk", "msg": "None not found. Perhaps this system does not use None to manage apache"}
ok: [node1] => (item=mime)
ok: [node1] => (item=negotiation)
failed: [node1] (item=php7.2) => {"ansible_loop_var": "item", "changed": false, "item": "php7.2", "msg": "None not found. Perhaps this system does not use None to manage apache"}
ok: [node1] => (item=proxy)
ok: [node1] => (item=proxy_http)
ok: [node1] => (item=rewrite)
failed: [node1] (item=rpaf) => {"ansible_loop_var": "item", "changed": false, "item": "rpaf", "msg": "None not found. Perhaps this system does not use None to manage apache"}
ok: [node1] => (item=setenvif)
failed: [node1] (item=ssl) => {"ansible_loop_var": "item", "changed": false, "item": "ssl", "msg": "None not found. Perhaps this system does not use None to manage apache"}
ok: [node1] => (item=filter)