diff --git a/roles/user/tasks/dotfiles.yml b/roles/user/tasks/dotfiles.yml index 72310b7..98644b0 100644 --- a/roles/user/tasks/dotfiles.yml +++ b/roles/user/tasks/dotfiles.yml @@ -7,18 +7,6 @@ import_tasks: debian.yml when: ansible_os_family == "Debian" -- name: init neovim - import_tasks: neovim.yml - when: '"nvim" in user.config.stowing' - -- name: init vim - import_tasks: vim.yml - when: '"vim" in user.config.stowing' - -- name: init sway - import_tasks: sway.yml - when: '"sway" in user.config.stowing' - - name: Clone dotfiles ansible.builtin.git: repo: "{{ user.config.giturl }}" @@ -35,3 +23,14 @@ chdir: "/home/{{ user.username }}/.dotfiles" with_items: "{{ user.config.stowing }}" +- name: init neovim + import_tasks: neovim.yml + when: '"nvim" in user.config.stowing' + +- name: init vim + import_tasks: vim.yml + when: '"vim" in user.config.stowing' + +- name: init sway + import_tasks: sway.yml + when: '"sway" in user.config.stowing' diff --git a/roles/user/tasks/main.yml b/roles/user/tasks/main.yml index 007d9b4..a99e574 100644 --- a/roles/user/tasks/main.yml +++ b/roles/user/tasks/main.yml @@ -16,6 +16,7 @@ shell: "{{ user.shell | default('/bin/bash') }}" state: present system: "{{ user.system | default('no') }}" + create_home: true # - name: ssh -- Add public key @@ -24,9 +25,15 @@ key: "{{ lookup('file', item.keyfile) }}" state: present with_items: "{{ user.public_key }}" - when: user.public_key + #when: user.public_key + when: false # Dotfiles - name: set dotfiles import_tasks: dotfiles.yml +- name: user owns its create_home + file: + path: "/home/{{ user.username }}/.dotfiles" + owner: "{{ user.username }}" + group: users diff --git a/roles/user/tasks/sway.yml b/roles/user/tasks/sway.yml index 12094ee..ba84729 100644 --- a/roles/user/tasks/sway.yml +++ b/roles/user/tasks/sway.yml @@ -19,5 +19,9 @@ state: present - name: Install sway AUR packages - aut: - - avizo + aur: + name: avizo + state: present + become: yes + become_user: aur_builder + diff --git a/roles/user/tasks/vim.yml b/roles/user/tasks/vim.yml index b8974e5..dea0c28 100644 --- a/roles/user/tasks/vim.yml +++ b/roles/user/tasks/vim.yml @@ -11,6 +11,12 @@ state: present when: ansible_os_family == "Debian" +- name: mkdir autoload + ansible.builtin.file: + path: "/home/{{ user.username }}/.vim/autoload" + owner: "{{ user.username }}" + state: directory + - name: Install vim-plug get_url: url: "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" diff --git a/vars/users.yml b/vars/users.yml index e203347..17271f0 100644 --- a/vars/users.yml +++ b/vars/users.yml @@ -1,29 +1,28 @@ $ANSIBLE_VAULT;1.1;AES256 -63626664646236643164303430333632326363336639346236366239653331313461306464383366 -3231306334393461613636363439303965623962306263320a623132386136643131373262356633 -30313139653038383066353861633165636365376337633461623837386563323731323335646530 -6437383964386662660a656139633464646266336164383766343332653831636362366533353861 -36303966326465383161373032366266653361313830356438393835353031336630623330653961 -66306535666331633636343638626634383861356137316236396333613665323963636566316661 -31643165633932643465333061383335613336623635366331366438393835383430396465353934 -63626335663139616234613461653636316139386435653133643065383866323462363936333330 -61653031316538343165333137356137346238306663333665363665663037323233323135343139 -30633636656133656562363366376539303937623937353935386532356165633231333365303735 -34313236373435393237643838383362653032306334383761666539323963613565653331393966 -36366634383965633832306537323630313238663430393138306438623864633238663633363461 -30396337666438326166653739306637393330373633613830336638393238643332633031343865 -66303264326362343964383864653035656533326134653063613833326333666262396561616135 -34616233343264396439363861663166393139663763303866356366316461363361366333323532 -33353361663963616436303132316336386632613836613838663063666433653635393066303662 -63613961373336353062653066393866343765383636303133393032663866663738343263373531 -32376261653632353036316132396164643339363435666365393139386636353630626364663233 -38323163616561336661313731666262376234386662383139326538386464613635663964396461 -37393661646466313730396436343962343633313537393365343661663434643033323564646133 -33323561636662373536363533626437633736323636653335653932666335396662393239396165 -61363737363064386332353235666262653939313932323735366233363261656364666430656631 -35376463386537383966396231653664346334346139303736333730303961326337666465363333 -39326239653166393431306166346532663231303562383237646132666164343566343039303866 -37653662643037656437643532303039613765396538376238336337653831366339356635376138 -33363566656361383735316261383637663262333739626531383863653836613836316536626433 -34633966376361643263306163626231366638346535633230393631656561323561333436653965 -39633966383863613664 +31353235646431363762343763666166336635663766353038613334343366646266643035323663 +6132393434623331333739313366396438316639323835340a313033346235316238623532623161 +39643062633262323731646433303865633330626664623237643362383938376532653964376632 +6138343164616333380a363362353437373865303032646431306263313438616563653735653165 +37623535396335616264633661323161656234356635316339383663623762396139646336343939 +61636631616232383836373034366662373064323662343731383566393266396564333037363466 +62303437656337663664336165396438653136613837636161626165306565363065343038363039 +31393865373733313237343366356334653734653737633365636166636466666435383430383165 +63626535653931303132346662396339666630363262626431356330636238353639653662613562 +64663932323336356631326564643334666433306436386264636136636639386337633531303066 +61363761316630333437666532363237376330316638303933336131343530343032653561383736 +35323833336433656332643864386335306536313366336462386330653262303432303537616139 +37663534653837383762633365353438663539396237386334633132633362636436616631636139 +35636134313335393662303664383731393130333034386233666132316633383736333530373261 +62396334386332373161666338366264666564356236663033333965393537333738336463666636 +39373362393433303532343138623735333866633364333337313233616137323462343164643636 +65656130616434333737386562383632313331653731646530373232333239306430366235633938 +32333935333561343434316337333530323463333435326434383132393532656365303765333735 +65333638326537346464346531396166656361396363313561306534306661303134313331383630 +37646239326336363032303935646461376331313735343435383531326334306166646637343630 +31336366343631623766623863383863326462633164323561303033383163383732313863353936 +30613263623639663539333737363033353130333364393738316139383436663630303137373566 +30656163313139343832336565343933343633316366343763643532313764343338383336363364 +34343561663931366437303166623739326439326162666530353866303130653365626663623336 +39373632623761646161313033633063666637303532623433373264373335303632626464613938 +64326636333036616537633863376330343933373635646133396233383037333964353237336430 +383335323239626333366338323336336232