Skip to content
Snippets Groups Projects
Commit 881b6a1a authored by fejao's avatar fejao
Browse files

Merge branch 'Setting_ansible_lint_03' into 'main'

Setting ansible lint 03

See merge request !8
parents 859e7a77 3b7b2ed5
No related branches found
No related tags found
1 merge request!8Setting ansible lint 03
Pipeline #37383 passed
......@@ -15,6 +15,8 @@ variables:
PLAYBOOK_NAME_FOR_ROLE_TEST: "playbook_example_01_test.yml"
PLAYBOOK_NAME_FOR_ROLE_DEPENDENCIES: "playbook_example_02_dependencies.yml"
PLAYBOOK_NAME_FOR_ROLE_CLONE_REPOSITORIES: "playbook_example_03_clone_repositories.yml"
PLAYBOOK_NAME_FOR_ROLE_DOCKER_IMAGES: "playbook_example_04_docker_images.yml"
PLAYBOOK_NAME_FOR_ROLE_DOCKER_CONTAINERS: "playbook_example_05_docker_containers.yml"
stages:
- debug
......@@ -75,3 +77,23 @@ role-clone-repositories:
- echo "Running ansible-lint tests at the role-> 'clone_repositories'"
- ansible-lint $PLAYBOOK_NAME_FOR_ROLE_CLONE_REPOSITORIES
allow_failure: false
role-docker-images:
stage: lint-tests
before_script:
- apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/*
- pip3 install -r requirements.txt
script:
- echo "Running ansible-lint tests at the role-> 'docker_images'"
- ansible-lint $PLAYBOOK_NAME_FOR_ROLE_DOCKER_IMAGES
allow_failure: false
role-docker-containers:
stage: lint-tests
before_script:
- apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/*
- pip3 install -r requirements.txt
script:
- echo "Running ansible-lint tests at the role-> 'docker_containers'"
- ansible-lint $PLAYBOOK_NAME_FOR_ROLE_DOCKER_CONTAINERS
allow_failure: false
---
# Runs example for
- hosts:
- name: Playbook for running the role 'docker_images'
hosts:
- example_servers_group
roles:
- docker_images
---
galaxy_info:
role_name: docker-containers
role_name: docker_containers
description: Role to work with the containers for the c3InfoDesk sytems
author: fejao
company: cccv.de
......
......@@ -11,4 +11,3 @@
ansible.builtin.debug:
var: ret_docker_compose_down
when: c3infodesk_printer_docker_compose_down_debug | bool
......@@ -11,4 +11,3 @@
ansible.builtin.debug:
var: ret_docker_compose_stop
when: c3infodesk_printer_docker_compose_stop_debug | bool
......@@ -21,6 +21,8 @@
when:
- cups_status is defined
- cups_status != 'masked'
register: ret_stop_cups
changed_when: ret_stop_cups.rc != 0
- name: DISABLE CUPS | Disable the running CUPS on target
ansible.builtin.command:
......@@ -30,6 +32,8 @@
when:
- cups_status is defined
- cups_status != 'masked'
register: ret_disable_cups
changed_when: ret_disable_cups.rc != 0
- name: DISABLE CUPS | Mask the running CUPS on target
ansible.builtin.command:
......@@ -39,3 +43,5 @@
when:
- cups_status is defined
- cups_status != 'masked'
register: ret_mask_cups
changed_when: ret_mask_cups.rc != 0
......@@ -18,6 +18,7 @@
chdir: "{{ c3infodesk_printer_folder }}"
register: build_img_result
when: result_check_image.images | length <= 0
changed_when: build_img_result.rc != 0
- name: APP | DEBUG -> Output from creating the docker image
ansible.builtin.debug:
......
......@@ -23,6 +23,7 @@
chdir: "{{ c3infodesk_printer_folder }}"
register: build_img_result
when: result_check_image.images | length <= 0
changed_when: build_img_result.rc != 0
- name: CUPS | DEBUG -> Output from creating the docker image
ansible.builtin.debug:
......
......@@ -18,6 +18,7 @@
chdir: "{{ c3infodesk_printer_folder }}"
register: build_img_result
when: result_check_image.images | length <= 0
changed_when: build_img_result.rc != 0
- name: PROXY | DEBUG -> Output from creating the docker image
ansible.builtin.debug:
......
---
# tasks file for docker-images
- import_tasks: docker_image_cups.yml
- import_tasks: docker_image_app.yml
- import_tasks: docker_image_proxy.yml
- name: Create the docker image for cups
ansible.builtin.import_tasks: docker_image_cups.yml
- name: Create the docker image for app
ansible.builtin.import_tasks: docker_image_app.yml
- name: Create the docker image for proxy
ansible.builtin.import_tasks: docker_image_proxy.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment