nog een update
This commit is contained in:
+19
-31
@@ -1,3 +1,10 @@
|
||||
- name: Preprovisioning
|
||||
hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- import_tasks: tasks/preprovision.yml
|
||||
handlers:
|
||||
- import_tasks: handlers/main.yml
|
||||
- name: Provision all hosts
|
||||
hosts: all
|
||||
become: true
|
||||
@@ -5,26 +12,14 @@
|
||||
- name: Set hostname
|
||||
hostname:
|
||||
name: "{{ inventory_hostname }}"
|
||||
- name: Print distribution
|
||||
ansible.builtin.debug:
|
||||
#var: ansible_facts ansible_distribution_release
|
||||
var: ansible_distribution_release
|
||||
# - name: Print distribution
|
||||
# ansible.builtin.debug:
|
||||
# var: ansible_distribution_release
|
||||
- name: Add aurbis group
|
||||
ansible.builtin.group:
|
||||
name: aurbis
|
||||
state: present
|
||||
- name: Create users
|
||||
ansible.builtin.user:
|
||||
name: "{{ item }}"
|
||||
groups:
|
||||
- aurbis
|
||||
- sudo
|
||||
- wheel
|
||||
append: true
|
||||
shell: /bin/bash
|
||||
state: present
|
||||
when: users is defined
|
||||
loop: "{{ users }}"
|
||||
- import_tasks: tasks/create_users.yml
|
||||
- name: Add IP address of relevant hosts to /etc/hosts
|
||||
lineinfile:
|
||||
dest: /etc/hosts
|
||||
@@ -58,18 +53,11 @@
|
||||
hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- name: Git clone
|
||||
ansible.builtin.git:
|
||||
repo: https://git.hoekveen.net/mark/scripts.git
|
||||
dest: /opt/scripts
|
||||
force: true
|
||||
- name: Set permissions and ownership for scripts folder
|
||||
file:
|
||||
path: /opt/scripts
|
||||
state: directory
|
||||
recurse: true
|
||||
group: aurbis
|
||||
mode: "0775"
|
||||
- name: Add scripts directory to safe.directory
|
||||
ansible.builtin.command:
|
||||
cmd: git config --system --add safe.directory /opt/scripts
|
||||
- import_tasks: tasks/scripts.yml
|
||||
- name: Add Nocturnal SMB share
|
||||
hosts: home
|
||||
vars_files:
|
||||
- vault/nocturnal.yml
|
||||
become: true
|
||||
tasks:
|
||||
- import_tasks: tasks/nocturnal_smb.yml
|
||||
|
||||
Reference in New Issue
Block a user