GithubHelp home page GithubHelp logo

Comments (6)

cupen avatar cupen commented on July 22, 2024

So, where is your playbook.yml? ;p

from action-ansible-playbook.

MasteringBOX avatar MasteringBOX commented on July 22, 2024

I can't find mine either. It is supposed to be in the repository as I understand, but it doesn't seem to work.

from action-ansible-playbook.

dawidd6 avatar dawidd6 commented on July 22, 2024

Show me your workflows first. How should I know what are you really doing.

from action-ansible-playbook.

MasteringBOX avatar MasteringBOX commented on July 22, 2024

Thanks for replying @dawidd6
My workflow

name: Deploy
on:
  push:
    branches: [ main ]
  workflow_dispatch:
 
jobs:
  deploy_code:
    runs-on: ubuntu-latest
    steps:
      - name: Run Ansible playbook
        uses: dawidd6/[email protected]
        with:
          playbook: ansible/deploy.yml 
          key: ${{ secrets.ansible_private_key }} 
          inventory: ${{ secrets.ansible_inventory }}

The error I get

/opt/pipx_bin/ansible-playbook ansible/deploy.yml --inventory-file .ansible_inventory
ERROR! the playbook: ansible/deploy.yml could not be found

I tried different paths, and changed the playbook directory with the directory variable. I have the ansible playbook and roles in ansible directory in my repository. I'm I supposed to have them somewhere else?

from action-ansible-playbook.

dawidd6 avatar dawidd6 commented on July 22, 2024

You need to check out the repository first. Use actions/checkout.

from action-ansible-playbook.

MasteringBOX avatar MasteringBOX commented on July 22, 2024

Ups, for some reason I though I didn't need that when using your action. Thanks, solved.

from action-ansible-playbook.

Related Issues (20)

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.