Skip to content

Commit 0bfb854

Browse files
committed
Fix
Signed-off-by: chez-shanpu <tomoki.sugiura@mail.shanpu.info>
1 parent 5acd4de commit 0bfb854

File tree

30 files changed

+189
-193
lines changed

30 files changed

+189
-193
lines changed

.github/workflows/ansible-scheduled.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
ANSIBLE_FORCE_COLOR: 1
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
- name: Run make
1717
run: make
1818
- name: Idempotence Test
@@ -23,7 +23,7 @@ jobs:
2323
|| (echo 'Idempotence test: fail' && exit 1)
2424
- name: Archive Idempotence Test output
2525
if: always()
26-
uses: actions/upload-artifact@v2
26+
uses: actions/upload-artifact@v4
2727
with:
2828
name: idempotence-out
2929
path: idempotence-out.txt

.github/workflows/ansible.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
ANSIBLE_FORCE_COLOR: 1
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020
- name: Run make
2121
run: make
2222
- name: Idempotence Test
@@ -27,7 +27,7 @@ jobs:
2727
|| (echo 'Idempotence test: fail' && exit 1)
2828
- name: Archive Idempotence Test output
2929
if: always()
30-
uses: actions/upload-artifact@v2
30+
uses: actions/upload-artifact@v4
3131
with:
3232
name: idempotence-out
3333
path: idempotence-out.txt

Makefile

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@ ANSIBLE_LINT_EXCLUDE="-x indentation,unnamed-task,yaml[indentation]"
77

88
brew-Linux:
99
ifeq (, $(shell which brew))
10-
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | /bin/bash
11-
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
12-
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
13-
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
14-
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
10+
sudo apt-get update
11+
sudo apt-get install -y \
12+
build-essential \
13+
procps \
14+
curl \
15+
file \
16+
git
17+
./install-linuxbrew.sh
1518
else
1619
@echo "linuxbrew is already exits."
1720
endif
1821

1922
brew-Darwin:
2023
ifeq (, $(shell which brew))
21-
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | /bin/bash
24+
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2225
else
2326
@echo "homebrew is already exits."
2427
endif
@@ -31,9 +34,9 @@ age:
3134
brew install age
3235

3336
python-Linux:
34-
sudo apt update
35-
sudo apt install -y python3
36-
sudo apt upgrade -y python3
37+
sudo apt-get update
38+
sudo apt-get install -y python3
39+
sudo apt-get upgrade -y python3
3740

3841
python-Darwin:
3942
brew install python
@@ -42,11 +45,11 @@ python-Darwin:
4245
python: python-$(UNAME)
4346

4447
ansible-Linux:
45-
sudo apt update
46-
sudo apt install software-properties-common
47-
sudo add-apt-repository --yes --update ppa:ansible/ansible
48-
sudo apt install -y ansible
49-
sudo apt install -y ansible-lint
48+
sudo apt-get update
49+
sudo apt-get install -y software-properties-common
50+
sudo add-get-apt-repository --yes --update ppa:ansible/ansible
51+
sudo apt-get install -y ansible
52+
sudo apt-get install -y ansible-lint
5053

5154
ansible-Darwin:
5255
brew install ansible

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ $ vagrant up --provisioning
1414
$ vagrant halt
1515
$ vagrant destroy
1616
```
17+
18+
## Test with Lima

dev-provisioning.yaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
- hosts: localhost
33
strategy: linear
44
roles:
5-
- name: common
6-
tags: common
5+
- name: tools
6+
tags: tools
77

88
- name: mac
99
tags: mac
@@ -15,9 +15,6 @@
1515
- name: fish
1616
tags: fish
1717

18-
- name: anyenv
19-
tags: anyenv
20-
2118
- name: c
2219
tags: c
2320

@@ -30,18 +27,12 @@
3027
- name: go
3128
tags: go
3229

33-
- name: hyper-terminal
34-
tags: hyper-terminal
35-
3630
- name: kubernetes
3731
tags: kubernetes
3832

3933
- name: neovim
4034
tags: neovim
4135

42-
- name: python
43-
tags: python
44-
4536
- name: tex
4637
tags: tex
4738

group_vars/all.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
github_user: chez-shanpu
22
ghq_root: '{{ lookup("env","HOME") }}/ghq'
3-
repos_root: '{{ ghq_root }}/github.com/{{ github_user }}'
4-
dotfiles_path: '{{ repos_root }}/dotfiles'
3+
repos_root: '{{ ghq_root }}/github.com/{{ github_user }}'

install-linuxbrew.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
4+
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
5+
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
6+
echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bashrc

lima/Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SHELL:=/bin/bash
2+
3+
VM_NAME=dev-provisioning
4+
VM_OPTS=--arch x86_64
5+
VM_WORKDIR=--workdir ~/ghq/github.com/chez-shanpu/dev-provisioning/
6+
7+
.PHONY: lima
8+
lima:
9+
ifeq (, $(shell which limactl))
10+
brew install lima
11+
else
12+
@echo "lima is already exits."
13+
endif
14+
15+
.PHONY: setup
16+
setup: lima
17+
limactl create $(VM_OPTS) --name=$(VM_NAME) template://default
18+
limactl start $(VM_NAME)
19+
limactl shell $(VM_WORKDIR) $(VM_NAME) sudo apt-get update
20+
limactl shell $(VM_WORKDIR) $(VM_NAME) sudo apt-get install -y make
21+
22+
.PHONY: clean
23+
clean:
24+
-limactl stop $(VM_NAME)
25+
limactl delete $(VM_NAME)
26+
27+
.PHONY: all
28+
all: lima setup
29+
30+
.DEFAULT_GOAL=all

roles/anyenv/tasks/main.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

roles/c/tasks/main.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
2-
- include_tasks: debian.yaml
2+
- name: Setup C in Debian
3+
ansible.builtin.include_tasks: debian.yaml
34
when: ansible_os_family == "Debian"

0 commit comments

Comments
 (0)