Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup desktop #125

Merged
merged 15 commits into from
Oct 6, 2024
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.19
3.11.10
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
My ansible playbooks

## setup python environment
- install dependencies
- Ubuntu: `sudo apt install build-essential libssl-dev libffi-dev libbz2-dev libncurses-dev libsqlite3-dev python3-tk liblzma-dev`
- [install poetry](https://python-poetry.org/docs/)
- run `poetry install --sync` to ansible and related dev dependencies

Expand Down
2 changes: 2 additions & 0 deletions inventories/localhost
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[all]
localhost ansible_connection=local
3 changes: 2 additions & 1 deletion playbook-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
- { role: fonts, tags: fonts }
- { role: golang, tags: golang }
- { role: aqua, tags: aqua }
- { role: nfs-client, tags: nfs-client }
- { role: homenas_client, tags: homenas_client }
- { role: fluentd, tags: fluentd }
- { role: dropbox, tags: dropbox }
# intellij
# RStudio
2 changes: 1 addition & 1 deletion playbook-devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- { role: git, tags: git, GIT_INSTALLER: 'extra' }
- { role: shell, tags: shell, SHELL_TYPE: 'bash' }
- { role: fonts, tags: fonts }
- { role: nfs-client, tags: nfs-client }
- { role: nfs_client, tags: nfs_client }
- { role: docker, tags: docker }
- { role: aqua, tags: aqua }

Expand Down
2 changes: 1 addition & 1 deletion playbook-docker-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
- hosts: all
roles:
- { role: apt, tags: apt }
- { role: nfs-client, tags: nfs-client }
- { role: nfs_client, tags: nfs_client }
- { role: docker, tags: docker }
9 changes: 9 additions & 0 deletions roles/build-essential/tasks/build_Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,14 @@
- sysstat
- libbz2-dev

- name: Install
become: yes
ansible.builtin.apt:
name: "{{ packages }}"
vars:
packages:
- man-db
- vim

- name: Setup kernel parameters
ansible.builtin.include_tasks: kernel_param.yml
1 change: 1 addition & 0 deletions roles/homenas_client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 自宅NASのクライアントセットアップ
3 changes: 3 additions & 0 deletions roles/homenas_client/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

homenas_client_host: "192.168.10.108"
4 changes: 4 additions & 0 deletions roles/homenas_client/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

dependencies:
- role: nfs_client
31 changes: 31 additions & 0 deletions roles/homenas_client/tasks/configure_fstab_Ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

- name: Create Directories to mount
become: yes
ansible.builtin.file:
path: "/media/{{ item }}"
state: directory
mode: '0777'
with_items:
- { item: backup }
- { item: Multimedia }
- { item: Music }
- { item: iso }
- { item: Document }

- name: Mount
become: yes
ansible.posix.mount:
path: "/media/{{ item.path }}"
src: "{{ item.src }}"
fstype: nfs
opts: default
state: present
# yamllint disable rule:commas
wtih_items:
- { path: "backup", src: "{{ homenas_client_host }}:/backup" }
- { path: "iso", src: "{{ homenas_client_host }}:/iso" }
- { path: "Multimedia", src: "{{ homenas_client_host }}:/Multimedia" }
- { path: "Music", src: "{{ homenas_client_host }}:/Multimedia/Music" }
- { path: "Document", src: "{{ homenas_client_host }}:/Document" }
# yamllint enable rule:commas
4 changes: 4 additions & 0 deletions roles/homenas_client/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

- name: Setup fstab
ansible.builtin.include_tasks: configure_fstab_{{ ansible_distribution }}.yml
File renamed without changes.
Loading