Skip to content
Snippets Groups Projects
Commit 55ce9068 authored by Alessio Curri's avatar Alessio Curri
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
skip_list:
- '602'
[flake8]
ignore = E501,W503,E203
.molecule
.vagrant
.cache
*.swp
.DS_Store
__pycache__
*.pyc
playbook.retry
.vault_pass
---
include: 'https://gitlab.esss.lu.se/ics-infrastructure/gitlab-ci-yml/raw/master/Molecule.gitlab-ci.yml'
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
line-length: disable
# NOTE(retr0h): Templates no longer fail this lint rule.
# Uncomment if running old Molecule templates.
# truthy: disable
LICENSE 0 → 100644
BSD 2-Clause License
Copyright (c) 2020, European Spallation Source ERIC
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ics-ans-dns-client
Ansible playbook to conifigure the DNS resolution.
## License
BSD 2-clause
# Molecule managed
{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install /usr/bin/python3 /usr/bin/python3-config /usr/bin/dnf-3 sudo bash iproute && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
---
dependency:
name: galaxy
options:
role-file: roles/requirements.yml
lint:
name: yamllint
provisioner:
name: ansible
config_options:
defaults:
gather_timeout: 20
lint:
name: ansible-lint
playbooks:
converge: ../../playbook.yml
inventory:
group_vars:
all:
scenario:
name: default
verifier:
name: testinfra
lint:
name: flake8
driver:
name: docker
platforms:
- name: ics-ans-dns-client-default
image: centos:7
groups:
- all
---
- name: Prepare
hosts: all
gather_facts: false
tasks: []
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_default(host):
# TODO: implement at least a test
assert False
---
- hosts: all
become: true
roles:
- role: ics-ans-role-xxxx
---
# Add all the roles used below:
# If the role is public, https can be used
- src: git+https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-xxxxx.git
version: vX.X.X
# If the role isn't public, ssh has to be used
- src: git@gitlab.esss.lu.se:ics-ansible-galaxy/ics-ans-role-xxxxx.git
scm: git
version: vX.X.X
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment