Skip to content

Commit

Permalink
Merge pull request #363 from cradle8810/345_usermod
Browse files Browse the repository at this point in the history
345 usermod fixed
  • Loading branch information
cradle8810 authored Nov 3, 2024
2 parents 53f91ee + 2182a41 commit 738427f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/develop_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Prepare environments (ansible-galaxy install role)
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Prepare environments (ansible-galaxy install role)
run: |
Expand Down Expand Up @@ -127,6 +129,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Prepare environments (ansible-galaxy install role)
run: |
Expand Down
7 changes: 7 additions & 0 deletions inventories/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ all:
user:
- name: hayato
username: hayato
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
38396562616338333562613634333436303439626164653362633935653338633163396333633031
3335616530376331643032373961386135666265666366610a623061653731306630386638376136
64376335353461373666373433313462366436373631303436666139336365623263643162653563
3535316564646334350a376361666362643737383539366133363763663162313236643634343437
6564
gid: 1000
uid: 1000
homedir: "/home/hayato"
Expand Down
26 changes: 22 additions & 4 deletions tasks/all/usermod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,20 @@
loop:
"{{ all.vars.user }}"

- name: "Common / Makedir source dir parent (Ubuntu)"
ansible.builtin.file:
path: "{{ item.homedir }}/Source"
state: directory
owner: "{{ item.username }}"
group: "{{ item.username }}"
mode: '0755'
loop:
"{{ all.vars.user }}"

- name: "Common / Makedir source dir (Ubuntu)"
ansible.builtin.file:
path: "{{ item.homedir }}/Source/zshrc"
state: directory
recurse: true
owner: "{{ item.username }}"
group: "{{ item.username }}"
mode: '0755'
Expand Down Expand Up @@ -64,13 +73,22 @@
loop:
"{{ all.vars.user }}"

- name: "Common / Makedir source dir (Ubuntu)"
- name: "Common / Makedir source dir parent (macOS)"
ansible.builtin.file:
path: "{{ item.homedir_mac }}/Source/zshrc/"
recurse: true
path: "{{ item.homedir_mac }}/Source"
state: directory
owner: "{{ item.username }}"
group: "{{ item.username }}"
mode: '0755'
loop:
"{{ all.vars.user }}"

- name: "Common / Makedir source dir (macOS)"
ansible.builtin.file:
path: "{{ item.homedir_mac }}/Source/zshrc"
state: directory
owner: "{{ item.username }}"
group: "{{ item.username }}"
mode: '0755'
loop:
"{{ all.vars.user }}"
Expand Down

0 comments on commit 738427f

Please sign in to comment.