Giter VIP home page Giter VIP logo

Comments (7)

thigg avatar thigg commented on July 17, 2024 1

Did you try the Vagrantscript I was using?

Don't know if there is something specific with the used vm or how vagrant runs ansible here...

I import the key now manually and it works:

Vagrant.configure("2") do |config|

  config.vm.box = "debian/buster64"
  config.vm.provision "shell", inline: <<-SHELL
    apt -y install python-apt   
  SHELL

  config.vm.provision "shell", privileged:false, inline: <<-SHELL
    gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
  SHELL

  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "playbook.yml"
  end
   config.vm.network "forwarded_port", guest: 3000, host: 8083
end

from ansible_role_gitea.

DO1JLR avatar DO1JLR commented on July 17, 2024 1

I hope this will resolve it!

from ansible_role_gitea.

thigg avatar thigg commented on July 17, 2024 1

yes, worked

from ansible_role_gitea.

DO1JLR avatar DO1JLR commented on July 17, 2024

I don't have any experience with vagrant and need some help to reproduce the issue.

I run this ansible role (v2.1.2) at a blank debian buster. (see asciinema recording.)

I used the following package versions:

ansible-playbook --version
ansible-playbook 2.10.8
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]


hostnamectl 
   Static hostname: grmpg
         Icon name: computer-vm
           Chassis: vm
        Machine ID: d72735cff36a41f0a5326f0bb7eb1778
           Boot ID: 4501f9e2bdab4875b1ee09d804278652
    Virtualization: kvm
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-13-cloud-amd64
      Architecture: x86-64

but it went through without a problem and spawned a gitea on port 3000. The GPG key import did not cause any problems.

I would like to recreate the poblem and then solve it, but I need more tips to reproduce it. as I said, so far no contact with vagrant.

from ansible_role_gitea.

DO1JLR avatar DO1JLR commented on July 17, 2024

I am very sorry. I haven't really found the time to get to grips with Vagrantscript and so haven't tried deploying it myself.

You have found a workaround. I think that is good. Theoretically the ansible should do exactly the same.

ansible.builtin.command: "gpg --keyserver {{ gitea_gpg_server }} --recv {{ gitea_gpg_key }}"

But obviously this is not the case in the vagrantscript. (I don't know if there is a Vagrant firewall that forbids the communication to the gpg key server).

Do you have any idea why ansible behaves differently than the shell command in the vagrantscript?

from ansible_role_gitea.

thigg avatar thigg commented on July 17, 2024

Maybe the issue is, that the gpg key is added as root but checked as another user?
ansible is run in vagrant from the vagrant user and I had to import the key as vagrant user.

from ansible_role_gitea.

DO1JLR avatar DO1JLR commented on July 17, 2024

good idea.

This was not a problem under a native Debian. But who knows if public keys imported as root are also available as non-root...

from ansible_role_gitea.

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.