Mainly just update quoting

parent 6aaa5134
Pipeline #7593 failed with stage
in 6 minutes and 2 seconds
......@@ -4,7 +4,7 @@ cache:
key: ${CI_COMMIT_REF_SLUG}
stages:
- test
- test
variables:
MIRROR_VALUES_FILE: tests/triumf-mirror-values.yml
......@@ -13,24 +13,22 @@ centos7_test_install:
stage: test
image: centos:centos7
before_script:
- |
yum -y update && yum -y install ansible git
echo "localhost" > tests/inventory
mkdir -p tests/roles
ln -s $(pwd) tests/roles/nagios-nrpe-agent
- yum -y update && yum -y install ansible git
- echo "localhost" > tests/inventory
- mkdir -p tests/roles
- ln -s $(pwd) tests/roles/nagios-nrpe-agent
after_script:
- rm -rf tests/roles
- rm -f $MIRROR_VALUES_FILE
- rm -rf tests/roles
- rm -f $MIRROR_VALUES_FILE
script:
- |
set -ex
- set -ex
# Basic role syntax check
ansible-galaxy install --force --role-file=requirements.yml
ansible-playbook --list-hosts tests/test-playbook.yml --inventory tests/inventory --connection local
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --syntax-check
- ansible-galaxy install --force --role-file=requirements.yml
- ansible-playbook --list-hosts tests/test-playbook.yml --inventory tests/inventory --connection local
- ansible-playbook tests/test-playbook.yml --inventory tests/inventory --syntax-check
# Run the first time
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
- ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
- >
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
......
......@@ -2,10 +2,10 @@
include_vars: "{{ file | basename }}" # This include_vars module is kind of dumb, so we need to test the full path but only include basename
with_first_found:
- files:
- "{{ role_path }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_distribution | lower }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family | lower }}.yml"
- "{{ role_path }}/vars/default.yml"
- '{{ role_path }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml'
- '{{ role_path }}/vars/{{ ansible_distribution | lower }}.yml'
- '{{ role_path }}/vars/{{ ansible_os_family | lower }}.yml'
- '{{ role_path }}/vars/default.yml'
skip: true
loop_control:
loop_var: file
......@@ -14,10 +14,10 @@
include_tasks: "{{ file }}"
with_first_found:
- files:
- "tasks/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}-dependencies.yml"
- "tasks/{{ ansible_distribution | lower }}-dependencies.yml"
- "tasks/{{ ansible_os_family | lower }}-dependencies.yml"
- "tasks/default-dependencies.yml"
- '{{ role_path }}/tasks/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}-dependencies.yml'
- '{{ role_path }}/tasks/{{ ansible_distribution | lower }}-dependencies.yml'
- '{{ role_path }}/tasks/{{ ansible_os_family | lower }}-dependencies.yml'
- '{{ role_path }}/tasks/default-dependencies.yml'
skip: true
loop_control:
loop_var: file
......@@ -43,12 +43,12 @@
- name: Install extra config files
template:
src: "{{ config_file }}.j2"
dest: "/etc/nrpe.d/{{ config_file | basename }}"
src: '{{ config_file }}.j2'
dest: '/etc/nrpe.d/{{ config_file | basename }}'
owner: root
group: root
mode: 0644
loop: "{{ extra_config_files }}"
loop: '{{ extra_config_files }}'
loop_control:
loop_var: config_file
register: nrpe_extra_cfg_file
......
---
- hosts: all
roles:
- role: nagios-nrpe-agent
- role: nagios-nrpe-agent
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment