Coder Social home page Coder Social logo

ansible-creator-server's Introduction

Publish Image

Ansible Creator Server

Usage

podman run --name=ansible-creator-svc -d -p 5000:5000 ghcr.io/nilashishc/ansible-creator-server:latest

Scaffolding an Ansible collection

curl 'localhost:5000/init?collection=testns.testorg' --output testns-testorg.tar

Scaffolding an Ansible playbook project

curl 'localhost:5000/init?project=ansible-project&scm_org=ansible&scm_project=devops' --output ansible-devops-project.tar

Untar to get scaffolded contents:

tar -xvf </path/to/tar>

Debugging

Log into the running container inspect the logs:

podman exec -it ansible-creator-svc /bin/bash
cat ansible-creator-svc-<utc timestamp>.log
cat ansible-creator.log

ansible-creator-server's People

Contributors

nilashishc avatar

Watchers

 avatar

ansible-creator-server's Issues

Service endpoint method as GET isn't accepted

We ran into the following error, while using import fetch from 'node-fetch'; in our backstage application.
Usage -

...
    const requestOptions = {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({ collection: 'testns.testorg' })
    };

    try {
        const response = await fetch('http://localhost:5000/init', requestOptions);

        if (!response.ok) {
            throw new Error('Failed to fetch data');
        }
 ...

Error -

info: Running ansible collection create for testns.testorg
Error: TypeError: Request with GET/HEAD method cannot have body
    at new Request (/home/abc/Work/DevHub/backstage/node_modules/node-fetch/lib/index.js:1221:10)
    at /home/abc/Work/DevHub/backstage/node_modules/node-fetch/lib/index.js:1449:19
-------
    at NunjucksWorkflowRunner.execute (/home/abc/Work/DevHub/backstage/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts:501:9)
    at TaskWorker.runOneTask (/home/abc/Work/DevHub/backstage/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts:176:26)

Sticking to the specific library as it is recommended by backstage docs, having a 3rd party library packed with the downstream RHDH image would be critical.
We could check, a POST request works in our case.

Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.