diff --git a/.gitignore b/.gitignore index 3a77206..c46a9ec 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ logs/* # OS generated files # ###################### ._* +.ansible .tox *.egg-info .eggs diff --git a/defaults/main.yml b/defaults/main.yml index 60abffa..21e157d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -93,7 +93,7 @@ httpd_pki_setup_host: "{{ openstack_pki_setup_host | default('localhost') }}" ## Create a certificate authority if one does not already exist httpd_pki_create_ca: "{{ openstack_pki_authorities is not defined | bool and httpd_pki_create_certificates }}" -httpd_pki_regen_ca: '' +httpd_pki_regen_ca: "" httpd_pki_authorities: - name: "HTTPDRoot" country: "GB" @@ -134,7 +134,7 @@ httpd_pki_certificates: "{{ _httpd_pki_generate_certificates_vhosts }}" httpd_pki_create_certificates: "{{ httpd_pki_certificates | length > 0 }}" httpd_pki_default_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',DNS:' ~ ansible_facts['fqdn']) }}" httpd_pki_keys_path: "{{ httpd_pki_dir ~ '/certs/private/' }}" -httpd_pki_regen_cert: '' +httpd_pki_regen_cert: "" httpd_pki_intermediate_cert_name: "{{ openstack_pki_service_intermediate_cert_name | default('HTTPDIntermediate') }}" httpd_pki_intermediate_cert_path: "{{ httpd_pki_dir ~ '/roots/' ~ httpd_pki_intermediate_cert_name ~ '/certs/' ~ httpd_pki_intermediate_cert_name ~ '.crt' }}" diff --git a/examples/playbook.yml b/examples/playbook.yml index 64dac51..5e8b001 100644 --- a/examples/playbook.yml +++ b/examples/playbook.yml @@ -1,6 +1,5 @@ --- - - name: Installing Apache Web Server hosts: httpd roles: - - role: "{{ playbook_dir | dirname | basename }}" + - role: httpd diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml new file mode 100644 index 0000000..dcc2d12 --- /dev/null +++ b/molecule/default/converge.yml @@ -0,0 +1,5 @@ +--- +- name: Installing Apache Web Server + hosts: httpd + roles: + - role: "{{ playbook_dir | dirname | dirname | basename }}" diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 0324353..447389e 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -24,7 +24,7 @@ provisioner: name: ansible-lint playbooks: prepare: prepare.yml - converge: ../../examples/playbook.yml + converge: converge.yml verify: verify.yml inventory: links: diff --git a/requirements.yml b/requirements.yml index c56621e..90609d9 100644 --- a/requirements.yml +++ b/requirements.yml @@ -14,4 +14,4 @@ collections: - name: community.general source: https://github.com/ansible-collections/community.general type: git - version: 10.2.0 \ No newline at end of file + version: 10.2.0 diff --git a/tasks/httpd_post_install.yml b/tasks/httpd_post_install.yml index f12beb6..b08dead 100644 --- a/tasks/httpd_post_install.yml +++ b/tasks/httpd_post_install.yml @@ -76,7 +76,7 @@ - name: Remove Listen from Apache config ansible.builtin.lineinfile: dest: "{{ httpd_security_conf }}" - regexp: '^(Listen.*)' + regexp: "^(Listen.*)" backrefs: true - line: '#\1' + line: "#\\1" notify: Restart web server