Skip to content

Commit 5cef8bd

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

File tree

35 files changed

+251
-250
lines changed

35 files changed

+251
-250
lines changed

.ansible-lint

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
exclude_paths:
2-
- roles/neovim/tasks/debian.yaml
2+
- roles/neovim/tasks/debian.yaml
33
skip_list:
4-
- command-instead-of-shell
5-
- ignore-errors
6-
- git-latest
7-
- risky-file-permissions
4+
- command-instead-of-shell
5+
- ignore-errors
6+
- git-latest
7+
- risky-file-permissions
88
use_default_rules: true
99
verbosity: 1
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: ansible_test_scheduled
22
on:
33
schedule:
4-
- cron: '0 0 * * *'
4+
- cron: '0 0 * * *'
55
jobs:
66
test:
77
strategy:
@@ -11,22 +11,22 @@ jobs:
1111
env:
1212
ANSIBLE_FORCE_COLOR: 1
1313
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v2
16-
- name: Run make
17-
run: make
18-
- name: Idempotence Test
19-
run: |
20-
ansible-playbook -v -e "ansible_user=$(whoami)" ./dev-provisioning.yaml | tee idempotence-out.txt \
21-
| grep -q 'changed=0.*failed=0' \
22-
&& (echo 'Idempotence test: pass' && exit 0) \
23-
|| (echo 'Idempotence test: fail' && exit 1)
24-
- name: Archive Idempotence Test output
25-
if: always()
26-
uses: actions/upload-artifact@v2
27-
with:
28-
name: idempotence-out
29-
path: idempotence-out.txt
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
- name: Run make
17+
run: make
18+
- name: Idempotence Test
19+
run: |
20+
ansible-playbook -v -e "ansible_user=$(whoami)" ./dev-provisioning.yaml | tee idempotence-out.txt \
21+
| grep -q 'changed=0.*failed=0' \
22+
&& (echo 'Idempotence test: pass' && exit 0) \
23+
|| (echo 'Idempotence test: fail' && exit 1)
24+
- name: Archive Idempotence Test output
25+
if: always()
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: idempotence-out
29+
path: idempotence-out.txt
3030
# - name: Check Ansible connection plugins
3131
# if: always()
3232
# run: ansible-doc -t connection -l

.github/workflows/ansible.yaml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,40 @@ name: ansible_test
22
on:
33
push:
44
branches:
5-
- master
5+
- master
66
pull_request:
77
branches:
8-
- master
8+
- master
99
jobs:
1010
test:
1111
strategy:
1212
matrix:
13-
platform: [ubuntu-latest, macos-latest]
13+
platform: [
14+
ubuntu-latest,
15+
macos-latest
16+
]
1417
runs-on: ${{ matrix.platform }}
1518
env:
1619
ANSIBLE_FORCE_COLOR: 1
1720
steps:
18-
- name: Checkout code
19-
uses: actions/checkout@v2
20-
- name: Run make
21-
run: make
22-
- name: Idempotence Test
23-
run: |
24-
ansible-playbook -v -e "ansible_user=$(whoami)" ./dev-provisioning.yaml | tee idempotence-out.txt \
25-
| grep -q 'changed=0.*failed=0' \
26-
&& (echo 'Idempotence test: pass' && exit 0) \
27-
|| (echo 'Idempotence test: fail' && exit 1)
28-
- name: Archive Idempotence Test output
29-
if: always()
30-
uses: actions/upload-artifact@v2
31-
with:
32-
name: idempotence-out
33-
path: idempotence-out.txt
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
- name: Install homebrew
24+
uses: Homebrew/actions/setup-homebrew@master
25+
- name: Run make
26+
run: make
27+
- name: Idempotence Test
28+
run: |
29+
ansible-playbook -v -e "ansible_user=$(whoami)" ./dev-provisioning.yaml | tee idempotence-out.txt \
30+
| grep -q 'changed=0.*failed=0' \
31+
&& (echo 'Idempotence test: pass' && exit 0) \
32+
|| (echo 'Idempotence test: fail' && exit 1)
33+
- name: Archive Idempotence Test output
34+
if: always()
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: idempotence-out
38+
path: idempotence-out.txt
3439
# - name: Check Ansible connection plugins
3540
# if: always()
3641
# run: ansible-doc -t connection -l

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 apt-add-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: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
github_user: chez-shanpu
2-
ghq_root: '{{ lookup("env","HOME") }}/ghq'
3-
repos_root: '{{ ghq_root }}/github.com/{{ github_user }}'
4-
dotfiles_path: '{{ repos_root }}/dotfiles'
2+
ghq_root: '{{ lookup("env", "HOME") }}/ghq'
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

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)