Skip to content

Commit

Permalink
Add mounting skylark when console bootup
Browse files Browse the repository at this point in the history
  • Loading branch information
cradle8810 committed Sep 6, 2024
1 parent b4ac9bc commit 7b16535
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions console.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,7 @@
- name: Make Started Services
ansible.builtin.import_tasks:
file: tasks/service_start.yml

- name: Mount skylark
ansible.builtin.import_tasks:
file: tasks/console/mount_skylark.yml
10 changes: 10 additions & 0 deletions inventories/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ all:
64376335353461373666373433313462366436373631303436666139336365623263643162653563
3535316564646334350a376361666362643737383539366133363763663162313236643634343437
6564
gid: 1000
uid: 1000
homedir: "/home/hayato"
samba_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
64373962323533633737623665646132383830653438376263373531623439386666623363363236
3366653738393365303161373165393335663465363438300a343530643236386264666330646365
62663735663834613033633032613763376462346333343165653538383038633762636337316361
3738663863333931390a623839383165643363393537306635343237656337356534623036616465
6532
28 changes: 28 additions & 0 deletions tasks/console/mount_skylark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
- name: Mount skylark/Home
ansible.posix.mount:
src: "//{{ network.skylark.ipv4 }}/Home"
path: "{{ homedir }}/Home"
opts: "username={{ username }},password={{ password }},uid={{ uid }},gid={{ gid }}"
fstype: cifs
state: mounted
vars:
gid: "{{ all.vars.user[0].gid }}"
uid: "{{ all.vars.user[0].uid }}"
homedir: "{{ all.vars.user[0].homedir }}"
username: "{{ all.vars.user[0].username }}"
password: "{{ all.vars.user[0].samba_password }}"

- name: Mount skylark/Nullpo
ansible.posix.mount:
src: "//{{ network.skylark.ipv4 }}/Nullpo"
path: "{{ homedir }}/Nullpo"
opts: "username={{ username }},password={{ password }},uid={{ uid }},gid={{ gid }}"
fstype: cifs
state: mounted
vars:
gid: "{{ all.vars.user[0].gid }}"
uid: "{{ all.vars.user[0].uid }}"
homedir: "{{ all.vars.user[0].homedir }}"
username: "{{ all.vars.user[0].username }}"
password: "{{ all.vars.user[0].samba_password }}"

0 comments on commit 7b16535

Please sign in to comment.