diff options
| author | 2024-04-29 22:18:58 +0200 | |
|---|---|---|
| committer | 2024-05-01 15:58:27 +0200 | |
| commit | 81b66eb544e0860b8a7e6e2e851707a360c28be0 (patch) | |
| tree | b47ab011ae0252dfdb4c2babc4bacf213528bb98 | |
| parent | bump the debian version used (diff) | |
Install dependencies using poetry
| -rw-r--r-- | ansible/.gitattributes | 1 | ||||
| -rw-r--r-- | ansible/local_testing/Vagrantfile | 21 | 
2 files changed, 14 insertions, 8 deletions
| diff --git a/ansible/.gitattributes b/ansible/.gitattributes index 0a0fb7e..19871e3 100644 --- a/ansible/.gitattributes +++ b/ansible/.gitattributes @@ -1 +1,2 @@ +* text=auto  roles/pydis-users/vars/main.yml diff=ansible-vault merge=binary diff --git a/ansible/local_testing/Vagrantfile b/ansible/local_testing/Vagrantfile index d84ee52..e21357b 100644 --- a/ansible/local_testing/Vagrantfile +++ b/ansible/local_testing/Vagrantfile @@ -5,24 +5,29 @@ Vagrant.configure("2") do |config|      config.vm.box = "bento/debian-12"      config.vm.provision "shell", inline: <<-SHELL          sudo apt-get update -        apt-get install -y python3 openssh-server +        apt-get install -y python3 openssh-server sshpass          systemctl enable ssh      SHELL      config.vm.define "control", primary: true do |control|          control.vm.hostname = "control" -        control.vm.network "private_network", ip: "192.168.56.1", -            virtualbox__intnet: true -        control.vm.synced_folder "../", "/home/vagrant/infra", type: "rsync" -        control.vm.provision "shell", inline: <<-SHELL -            apt-get install -y sshpass python3-pip +        control.vm.network "private_network", ip: "192.168.56.1", virtualbox__intnet: true +        control.vm.synced_folder "../..", "/home/vagrant/infra", type: "rsync", rsync__exclude: ['.git-crypt', '.ruff_cache', 'dns', 'docs', 'kubernetes', 'venv', '.gitattributes', '.git', '.gitmodules', '.gitignore', '.pre-commit-config.yaml', 'LICENSE', 'README.md', 'server_bootstrap.sh'] + +        control.vm.provision "Install poetry", type: "shell", inline: <<-SHELL +            apt-get install -y python3-poetry          SHELL -        control.vm.provision "shell", privileged: false, inline: <<-SHELL -            python3 -m pip install --user ansible dnspython +        control.vm.provision "Generate ssh keys", type: "shell", privileged: false, inline: <<-SHELL              ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< y          SHELL +        control.vm.provision "Install dependencies", type: "shell", privileged: false, inline: <<-SHELL +            cd /home/vagrant/infra +            sudo poetry config virtualenvs.create false +            sudo PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install --only ansible --no-root +        SHELL +          control.vm.provider "virtualbox" do |v|            v.name = "pydis_control"          end | 
