Add Github actions and remove old ansible stuff
This commit is contained in:
parent
48216db8f9
commit
027ba46f6b
35
.github/workflows/vagrant.yml
vendored
Normal file
35
.github/workflows/vagrant.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: homelab-ci
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
homelab-ci:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache Vagrant boxes
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.vagrant.d/boxes
|
||||
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-vagrant-
|
||||
|
||||
- name: Install Ansible
|
||||
run: brew install ansible@7
|
||||
|
||||
- name: Software Versions
|
||||
run: |
|
||||
printf "VirtualBox "
|
||||
vboxmanage --version
|
||||
vagrant --version
|
||||
export PATH="/usr/local/opt/ansible@7/bin:$PATH"
|
||||
ansible --version
|
||||
|
||||
- name: Vagrant Up with Dockerbox Playbook
|
||||
run: |
|
||||
export PATH="/usr/local/opt/ansible@7/bin:$PATH"
|
||||
PLAYBOOK=dockerbox vagrant up
|
||||
vagrant ssh -c "docker ps"
|
@ -1,21 +1,3 @@
|
||||
- name: 'Install Ansible dependency: python3-apt'
|
||||
ansible.builtin.shell: 'apt-get update && apt-get install python3-apt -y'
|
||||
args:
|
||||
creates: /usr/lib/python3/dist-packages/apt
|
||||
warn: false
|
||||
|
||||
- name: Install additional Ansible dependencies
|
||||
ansible.builtin.apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
force_apt_get: true
|
||||
update_cache: true
|
||||
loop:
|
||||
- aptitude
|
||||
- python3-docker
|
||||
- python3-pymysql
|
||||
- python3-psycopg2
|
||||
|
||||
- name: Create Ansible's temporary remote directory
|
||||
ansible.builtin.file:
|
||||
path: "~/.ansible/tmp"
|
||||
|
Loading…
Reference in New Issue
Block a user