Compare commits

..

No commits in common. "b6d503a11bee9b3a2d9a91e2a6d9862e180f1da4" and "200412cfd0996d059aa02955dc294c1694cbd797" have entirely different histories.

2 changed files with 7 additions and 13 deletions

View File

@ -1,5 +1,3 @@
# Deploying my computers # Ansible Molecule Vagrant - test
## Combava ## 2021-12-22:
sudo ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook combava.yml --ask-vault-pass

View File

@ -1,16 +1,12 @@
--- ---
# tasks file for user # tasks file for user
- name: set facts
set_fact:
username: "{{ user.username }}"
# Create user # Create user
- name: users -- Ensure wheel group exists - name: users -- Ensure wheel group exists
group: group:
name: wheel name: wheel
state: present state: present
- name: "{{ username }}: create user " - name: create users
ansible.builtin.user: ansible.builtin.user:
name: "{{ user.username }}" name: "{{ user.username }}"
update_password: on_create update_password: on_create
@ -23,7 +19,7 @@
create_home: true create_home: true
# #
- name: "{{ username }}: Add public key" - name: ssh -- Add public key
authorized_key: authorized_key:
user: "{{ user.username }}" user: "{{ user.username }}"
key: "{{ lookup('file', item.keyfile) }}" key: "{{ lookup('file', item.keyfile) }}"
@ -33,10 +29,10 @@
when: false when: false
# Dotfiles # Dotfiles
- name: "{{ username }}: set dotfiles" - name: set dotfiles
import_tasks: dotfiles.yml import_tasks: dotfiles.yml
- name: "{{ username }}: gtk_settings" - name: gtk_settings
dconf: dconf:
key: "{{ item.key }}" key: "{{ item.key }}"
value: "{{ item.value }}" value: "{{ item.value }}"
@ -46,7 +42,7 @@
become_user: "{{ user.username }}" become_user: "{{ user.username }}"
- name: "{{ username }}: user owns its create_home" - name: user owns its create_home
file: file:
path: "/home/{{ user.username }}/.dotfiles" path: "/home/{{ user.username }}/.dotfiles"
owner: "{{ user.username }}" owner: "{{ user.username }}"