fix: organization customize
This commit is contained in:
parent
3f391f0ba5
commit
af0ee2691a
5 changed files with 71 additions and 39 deletions
|
|
@ -31,12 +31,16 @@
|
|||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Create unbound configs dir
|
||||
file:
|
||||
state: directory
|
||||
path: "/etc/unbound/config.d"
|
||||
|
||||
# copy from dots file to the /etc/unbound/config.d the additonal config enabled
|
||||
- name: Setup additonal namespaces config
|
||||
when: unbound_profiles is defined
|
||||
- name: Setup additonal profile config
|
||||
when: organization is defined and "unbound" in organization_customize
|
||||
become: true
|
||||
copy:
|
||||
src: "{{ home }}/.dots/config/unbound/profiles/{{ item }}.conf"
|
||||
dest: "/etc/unbound/config.d/{{ item }}.conf"
|
||||
with_items: "{{ unbound_profiles }}"
|
||||
src: "{{ home }}/.dots/profiles/{{ organization }}/configs/unbound.conf"
|
||||
dest: "/etc/unbound/config.d/{{ organization }}.conf"
|
||||
|
||||
|
|
|
|||
41
ansible/roles/ssh/tasks/main.yaml
Normal file
41
ansible/roles/ssh/tasks/main.yaml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
- name: Setup ssh dir
|
||||
file:
|
||||
path: "{{ home }}/.ssh"
|
||||
state: directory
|
||||
recurse: true
|
||||
owner: "{{ user }}"
|
||||
|
||||
- name: Copy pre-generated ssh keys
|
||||
when: "not target_is_real"
|
||||
block:
|
||||
- copy:
|
||||
src: ./vm_files/remote_key
|
||||
dest: "{{ home }}/.ssh/{{ device_name }}_generic_ed25519"
|
||||
mode: u=rw,g=,o=
|
||||
- copy:
|
||||
src: ./vm_files/remote_key.pub
|
||||
dest: "{{ home }}/.ssh/{{ device_name }}_generic_ed25519.pub"
|
||||
mode: u=rw,g=,o=
|
||||
|
||||
- name: Config git
|
||||
template:
|
||||
src: ssh_config
|
||||
dest: "{{ home }}/.ssh/config"
|
||||
owner: "{{ user }}"
|
||||
mode: u=rw,g=,o=
|
||||
|
||||
- name: Load known hosts
|
||||
template:
|
||||
src: known_hosts
|
||||
dest: "{{ home }}/.ssh/known_hosts"
|
||||
owner: "{{ user }}"
|
||||
mode: u=rw,g=,o=
|
||||
|
||||
- name: Load organization profile
|
||||
when: organization is defined and "ssh" in organization_customize
|
||||
become: true
|
||||
copy:
|
||||
src: "{{ home }}/.dots/profiles/{{ organization }}/configs/ssh"
|
||||
dest: "{{ home }}/.ssh/profiles/{{ organization }}"
|
||||
|
||||
template:
|
||||
Loading…
Add table
Add a link
Reference in a new issue