forked from infOpen/ansible-role-locales
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Temelio/develop
Update ansible, molecule env, role
- Loading branch information
Showing
27 changed files
with
348 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Ansible | ||
*.retry | ||
roles/ | ||
tests/roles/ | ||
|
||
# Swap files | ||
*.swo | ||
*.swp | ||
|
||
# Python bytecode | ||
*.pyc | ||
|
||
# Pytest | ||
.cache | ||
.pytest_cache | ||
|
||
# Tox | ||
.tox | ||
|
||
# Vagrant | ||
.vagrant | ||
*.log | ||
|
||
# Molecule | ||
.molecule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
# Pyup configuration | ||
|
||
branch: 'develop' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
extends: default | ||
|
||
rules: | ||
braces: | ||
max-spaces-inside: 1 | ||
level: error | ||
brackets: | ||
max-spaces-inside: 1 | ||
level: error | ||
line-length: disable | ||
truthy: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
--- | ||
galaxy_info: | ||
author: Alexandre Chaussier | ||
description: install locales package | ||
company: Infopen (http://www.infopen.pro) | ||
license: MIT | ||
min_ansible_version: 1.5 | ||
role_name: 'locales' | ||
author: 'A Chaussier, L Machetel' | ||
description: 'install locales package on Debian like systems' | ||
company: 'Temelio (https://www.temelio.com)' | ||
license: 'MIT' | ||
min_ansible_version: '2.4' | ||
platforms: | ||
- name: Ubuntu | ||
- name: 'Ubuntu' | ||
versions: | ||
- precise | ||
- quantal | ||
- saucy | ||
- trusty | ||
- utopic | ||
- vivid | ||
- name: Debian | ||
- 'trusty' | ||
- 'xenial' | ||
- 'bionic' | ||
- name: 'Debian' | ||
versions: | ||
- jessie | ||
- wheezy | ||
|
||
categories: | ||
- system | ||
- 'stretch' | ||
galaxy_tags: | ||
- 'system' | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 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 upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ | ||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all; \ | ||
elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && 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 update -y && 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
******* | ||
Install | ||
******* | ||
|
||
Requirements | ||
============ | ||
|
||
* Docker Engine | ||
* docker-py | ||
|
||
Install | ||
======= | ||
|
||
.. code-block:: bash | ||
$ sudo pip install docker-py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
|
||
dependency: | ||
name: 'galaxy' | ||
driver: | ||
name: 'docker' | ||
lint: | ||
name: 'yamllint' | ||
platforms: | ||
- name: "locales-docker-stretch" | ||
image: 'minimum2scp/systemd-stretch' | ||
command: '/sbin/init' | ||
cap_add: | ||
- 'SYS_PTRACE' | ||
privileged: true | ||
- name: "locales-docker-xenial" | ||
image: 'solita/ubuntu-systemd:16.04' | ||
command: '/sbin/init' | ||
cap_add: | ||
- 'SYS_PTRACE' | ||
privileged: true | ||
- name: "locales-docker-trusty" | ||
image: 'ubuntu:trusty' | ||
cap_add: | ||
- 'SYS_PTRACE' | ||
privileged: true | ||
- name: "locales-docker-bionic" | ||
image: 'solita/ubuntu-systemd:18.04' | ||
command: '/sbin/init' | ||
cap_add: | ||
- 'SYS_PTRACE' | ||
privileged: true | ||
provisioner: | ||
name: 'ansible' | ||
lint: | ||
name: 'ansible-lint' | ||
host_vars: {} | ||
scenario: | ||
name: 'default' | ||
verifier: | ||
name: 'testinfra' | ||
additional_files_or_dirs: | ||
- '../../tests' | ||
lint: | ||
name: 'flake8' | ||
options: | ||
sudo: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
|
||
# Role tests | ||
|
||
- name: 'Converge | Prerequisites tasks' | ||
hosts: 'locales-docker-xenial' | ||
gather_facts: false | ||
tasks: | ||
- name: 'PREREQUISITES | APT | Do an apt-get update' | ||
become: true | ||
raw: 'apt-get update -qq' | ||
changed_when: false | ||
- name: 'PREREQUISITES | APT | Install python 2.7' | ||
become: true | ||
raw: 'apt-get install -qq python2.7' | ||
changed_when: false | ||
|
||
|
||
- hosts: 'all' | ||
roles: | ||
- role: 'ansible-role-locales' |
Binary file added
BIN
+2.08 KB
molecule/default/tests/__pycache__/test_installation.cpython-27-PYTEST.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
Role tests | ||
""" | ||
|
||
import os | ||
from testinfra.utils.ansible_runner import AnsibleRunner | ||
|
||
testinfra_hosts = AnsibleRunner( | ||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') | ||
|
||
|
||
def test_hosts_file(host): | ||
""" | ||
Ensure /etc/default/locale file exists | ||
""" | ||
|
||
f = host.file('/etc/default/locale') | ||
|
||
assert f.exists | ||
assert f.user == 'root' | ||
assert f.group == 'root' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
docker==3.7.2 | ||
molecule==2.20.1 | ||
pytest==4.4.1 | ||
testinfra==2.1.0 | ||
tox==3.9.0 |
Oops, something went wrong.