* ci: disable injecting facts as own vars in the main namespace Signed-off-by: Norman Ziegner <[email protected]> * Consistently access facts via the ansible_facts.* namespace Signed-off-by: Norman Ziegner <[email protected]> --------- Signed-off-by: Norman Ziegner <[email protected]>
24 lines
835 B
YAML
24 lines
835 B
YAML
---
|
|
- name: Prepare playbook for kitchen testing "ansible-nginx-hardening" with custom settings
|
|
become: true
|
|
hosts: all
|
|
environment:
|
|
http_proxy: "{{ lookup('env', 'http_proxy') | default(omit) }}"
|
|
https_proxy: "{{ lookup('env', 'https_proxy') | default(omit) }}"
|
|
no_proxy: "{{ lookup('env', 'no_proxy') | default(omit) }}"
|
|
tasks:
|
|
- name: Install required packages
|
|
ansible.builtin.package:
|
|
name: python3-apt
|
|
update_cache: true
|
|
ignore_errors: true # noqa ignore-errors
|
|
|
|
- name: Set correct distribution Version for Amazon Linux
|
|
ansible.builtin.set_fact:
|
|
ansible_distribution_major_version: 7
|
|
when: ansible_facts.distribution == 'Amazon'
|
|
|
|
- name: Install nginx with a generic Ansible role
|
|
ansible.builtin.include_role:
|
|
name: geerlingguy.nginx
|