-
Notifications
You must be signed in to change notification settings - Fork 22
Debian 13 #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Debian 13 #235
Changes from all commits
41221bf
4fafe6e
9a290a5
ce8f4f2
7833e30
f1abab2
06e31f5
8ed2fe5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| ansible.builtin.package: | ||
| name: | ||
| - nmap | ||
| - curl | ||
|
|
||
| - name: Execute tests | ||
| gather_facts: false | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| --- | ||
| - name: Set OS dependent variables | ||
| ansible.builtin.include_vars: "{{ ansible_facts['os_family'] }}.yaml" | ||
|
|
||
| - name: Install Apache httpd | ||
| ansible.builtin.package: | ||
| name: | ||
| - httpd | ||
| - mod_ssl | ||
| name: "{{ httpd_packages }}" | ||
| state: present | ||
|
|
||
| - name: Set httpd_can_network_connect so Apache can connect to Puma and Gunicorn | ||
|
|
@@ -13,9 +14,14 @@ | |
| persistent: true | ||
| when: ansible_facts['selinux']['status'] == "enabled" | ||
|
|
||
| - name: Enable required modules | ||
| community.general.apache2_module: | ||
| name: "{{ item }}" | ||
| loop: "{{ httpd_modules }}" | ||
|
|
||
| - name: Disable welcome page | ||
| ansible.builtin.file: | ||
| path: /etc/httpd/conf.d/welcome.conf | ||
| path: "{{ httpd_conf_path }}/welcome.conf" | ||
| state: absent | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A thought for upgrades and not necessary for this PR: RPM will place this file back. Should we ensure it's empty instead?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or just deploy on Debian, where the package manager is actually sane and respects the choices of the admin ;)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or just put it all in a container |
||
|
|
||
| - name: Create cert directories | ||
|
|
@@ -31,8 +37,8 @@ | |
| ansible.builtin.file: | ||
| path: "{{ httpd_pub_dir }}" | ||
| state: directory | ||
| group: apache | ||
| owner: apache | ||
| group: "{{ httpd_group }}" | ||
| owner: "{{ httpd_user }}" | ||
| mode: "0755" | ||
|
|
||
| - name: Deploy certificates | ||
|
|
@@ -69,15 +75,15 @@ | |
| - name: Configure foreman vhost | ||
| ansible.builtin.template: | ||
| src: foreman-vhost.conf.j2 | ||
| dest: /etc/httpd/conf.d/foreman.conf | ||
| dest: "{{ httpd_conf_path }}/foreman.conf" | ||
| mode: "0644" | ||
| notify: | ||
| - Restart httpd | ||
|
|
||
| - name: Configure foreman-ssl vhost | ||
| ansible.builtin.template: | ||
| src: foreman-ssl-vhost.conf.j2 | ||
| dest: /etc/httpd/conf.d/foreman-ssl.conf | ||
| dest: "{{ httpd_conf_path }}/foreman-ssl.conf" | ||
| mode: "0644" | ||
| notify: | ||
| - Restart httpd | ||
|
|
@@ -87,6 +93,6 @@ | |
|
|
||
| - name: Start Apache httpd | ||
| ansible.builtin.service: | ||
| name: httpd | ||
| name: "{{ httpd_service }}" | ||
| state: started | ||
| enabled: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| httpd_packages: | ||
| - apache2 | ||
| httpd_etc_path: /etc/apache2 | ||
| httpd_conf_path: "{{ httpd_etc_path }}/conf-enabled" | ||
| httpd_modules_path: "{{ httpd_etc_path }}/mods-enabled" | ||
| httpd_service: apache2 | ||
| httpd_log_path: /var/log/apache2 | ||
| httpd_user: www-data | ||
| httpd_group: www-data | ||
| httpd_modules: | ||
| - ssl | ||
| - headers | ||
| - proxy | ||
| - proxy_http |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| httpd_packages: | ||
| - httpd | ||
| - mod_ssl | ||
| httpd_etc_path: /etc/httpd | ||
| httpd_conf_path: "{{ httpd_etc_path }}/conf.d" | ||
| httpd_modules_path: "{{ httpd_etc_path }}/conf.modules.d" | ||
| httpd_service: httpd | ||
| httpd_log_path: /var/log/httpd | ||
| httpd_user: apache | ||
| httpd_group: apache | ||
| httpd_modules: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,14 @@ | ||
| import pytest | ||
|
|
||
|
|
||
| def test_hammer_ping(server): | ||
| if server.system_info.distribution == 'debian': | ||
| pytest.xfail('Hammer is not properly set up on Debian yet') | ||
| hammer = server.run("hammer ping") | ||
| assert hammer.succeeded | ||
|
|
||
| def test_hammer_organizations_list(server): | ||
| if server.system_info.distribution == 'debian': | ||
| pytest.xfail('Hammer is not properly set up on Debian yet') | ||
| hammer = server.run("hammer organization list") | ||
| assert hammer.succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like pulling in
community.generalhere, but this is something we'd have to consider anyway.In the Puppet installer, we run with
apache::default_mods: false, which wipes all enabled modules and then we enable the ones we need.We didn't port that detail over to foremanctl, and rely on the OS to enable those modules for us. But it also most probably enables things we do not want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may also want to enable the event MPM in a similar way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask why it is bad to use
community.general?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly because it's a dependency we don't yet have
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also mentions compatibility:
So configuring Apache with Ansible is certainly worse than what we had with our Puppet module.