Code Monkey home page Code Monkey logo

Comments (7)

troykinsella avatar troykinsella commented on May 23, 2024

Hi there! This resource is put-only, so a get, regardless of this error, would be a no-op.
If you have a playbook that you're trying to run from a pipeline, you can pull in a git resource, for example, and then invoke it via a put:

- name: run-my-playbook
  steps:
  - get: master # your git repo
  - put: ansible
    params:
      check: true
      diff: true
      inventory: inventory/some-hosts.yml
      playbook: site.yml
      path: master

Hope that helps. Let me know if you had something else in mind.

from concourse-ansible-playbook-resource.

robertskworld avatar robertskworld commented on May 23, 2024

Thank you very much for your answer.
I would like to draw attention to the fact that my problem is not in the implementation of put/get via the job - but in the initialization check of the resource type itself, which is done before the implementation/build, as seen in the printscreen.

So for clarity:

  • I also tried it with the put option - the same result
  • here is my procedure, with the described result:

-> cat pipeline-ansible.yaml
_concourse ansible_playbook pipeline

-> fly destroy-pipeline /target ace-test /p deploy-ansible-playbook
!!! this will remove all data for pipeline deploy-ansible-playbook

are you sure? [yN]: y
deploy-ansible-playbook does not exist

-> fly set-pipeline /target ace-test /pipeline deploy-ansible-playbook /config ./pipeline-ansible.yaml
resources:
resource ansible has been added:

  • icon: ansible

  • name: ansible

  • source:

  • debug: true

  • verbose: vv

  • type: ansible

    resource git has been added:

  • icon: github

  • name: git

  • source:

  • branch: master

  • password: ((git-acecloud-interny.gitpswd))

  • skip_ssl_verification: true

  • uri: https://gitlab/........./linux-playbooks

  • username: ((git-acecloud-interny.gituser))

  • type: git

resource types:
resource type ansible has been added:

  • name: ansible
  • source:
  • repository: troykinsella/concourse-ansible-playbook-resource
  • tag: latest
  • type: docker-image

jobs:
job deploy-ansible-playbook has been added:

  • name: deploy-ansible-playbook
  • plan:
    • get: git
    • params:
  • inventory: _play.lin.node_exporter/inventory/hosts
    
  • path: git
    
  • playbook: _play.lin.node_exporter/_ansible_playbook.linux.prometheus.yml
    
  • put: ansible

pipeline name: deploy-ansible-playbook

apply configuration? [yN]: y
pipeline created!
you can view your pipeline here: https://concourse............../pipelines/deploy-ansible-playbook

the pipeline is currently paused. to unpause, either:

  • run the unpause-pipeline command:
    C:\sklad\concourse_cli\fly.exe -t ace-test unpause-pipeline -p deploy-ansible-playbook
  • click play next to the pipeline in the web ui

_concourse ansible_playbook implementation

from concourse-ansible-playbook-resource.

troykinsella avatar troykinsella commented on May 23, 2024

Do you have a private Docker registry in place, perhaps? If so, are you able to delete the latest tag and re-pull? Can you fetch the image directly from a Concourse worker?

What happens when you fly check-resource-type --resource-type deploy-ansible-playbook/ansible?

How about a fly clear-versions?

Sorry if these suggestions are obvious. I've not encountered this error before.

from concourse-ansible-playbook-resource.

robertskworld avatar robertskworld commented on May 23, 2024

Hello,

I had to change the pipeline a bit, but the result is the same.
I don't use any private repo, I call DockerHub directly.
As I wrote, the error is reported by the resource and not the resource type check.
I increased the debug level, but from the monitoring results - I don't see anything new.
Just checking the source gives me an error, but I can't tell if it's a reason.
I could not find out how to fetch the image from the worker node, if you advise, I will do it. But I have a feeling that it will only happen when the resource's init check passes.

FYI - fly CLI is on windows
fly --version
7.11.2

_concourse ansible pipeline
_concourse ansible pipeline outputs

from concourse-ansible-playbook-resource.

robertskworld avatar robertskworld commented on May 23, 2024

Hello,

FYI:
when I use the version 2.2.2 of your source type - everything works, is OK.
So the problem will be around the changes of the last version.

One more question please:
Is it possible to change the version of ansible, or is it always static according to the version of resource type?

from concourse-ansible-playbook-resource.

troykinsella avatar troykinsella commented on May 23, 2024

I've rebuilt the image and pushed a fresh latest tag. Can you please check if the issue is resolved?

You could probably install a specific version of Ansible upon every job run, as per this explanation for additional modules: https://github.com/troykinsella/concourse-ansible-playbook-resource?tab=readme-ov-file#custom-setup-commands
But, the overhead of doing so might be undesirable, and if so, I think you're looking at extending this image and installing the things that you require.

from concourse-ansible-playbook-resource.

robertskworld avatar robertskworld commented on May 23, 2024

from concourse-ansible-playbook-resource.

Related Issues (18)

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.