Skip to content

Commit

Permalink
Chore/Change roles to use underscore instead of '-' following ansible…
Browse files Browse the repository at this point in the history
…-lint recomendations
  • Loading branch information
andre-gonzalez committed Jul 13, 2024
1 parent 2d1415f commit e6aeb77
Show file tree
Hide file tree
Showing 82 changed files with 102 additions and 103 deletions.
1 change: 0 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
skip_list:
- ignore-errors
- package-latest
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is my personal ansible playbook to install and configure my workstation and
3. Install ansible on the machine you want to configure use `sudo pacman -Syy ansible`
4. Run the following code:
```
ansible-pull --vault-password-file [key file location] --ask-become -t "[full-install|light-install],[samsung-expert|netbook]" --become-method=[doas|sudo] -U https://github.com/andre-gonzalez/ansible.git
ansible-pull --vault-password-file [key file location] --ask-become -t "[light_workstation|heavy_workstation],[samsung_expert]" --become-method=[doas|sudo] -U https://github.com/andre-gonzalez/ansible.git
```
5. Sit back and relax

Expand All @@ -24,7 +24,7 @@ ansible-playbook -t [tag1, tag2] --ask-become local.yml
```

# Scripts ready to run
1. Light-workstation role install
1. Light_workstation role install
```
bash <(curl -L tinyurl.com/ansible-netbook)
```
Expand All @@ -37,9 +37,9 @@ bash <(curl -L tinyurl.com/ansible-samsung)
# Roles structure
### base
- This role runs on all machines. It set configurations that should be on every system
### light-workstation
### light_workstation
- This role set a light workstation, without applications that has a high resource usage
### heavy-workstation
### heavy_workstation
- This role set the high resource usage applications
### work
- This role configure work related stuff
Expand Down
106 changes: 53 additions & 53 deletions hosts.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
$ANSIBLE_VAULT;1.1;AES256
34653433366636323466316535643064613863636663373364613166626434343130323566663433
6338346635373463313238633266333037316633626431370a316365376566663633323263636133
32663536383366313937366134653763636339646364313038386338633132346635383961303439
3736373034383861340a663735646237643735336236386330666165383934353330613435396661
64623236653331383039663663333032636364376538636362393664313736653435616536326562
35366238656637383231653431623133626333316366613430303166303630633937376366636262
64623265663937373730343262666638646338313966373434373962306161626237656637643564
64643666363434383436373766643963663134363066383536373265373133383938313535616531
32366666653233366435666162363465666563613962353665383161306133366361646333396266
30646130303131383834653939306362623130356534303939336465386131393462666636636266
62333536366334306137356636653965643432623337613735303236633738626465373366303032
34643964316665303865353438623739306531613637333966353461346162326162316265646436
39623663323837393337346337393161393839646337666565363839613565386332393732313363
63623361316234346565366161343239313238353836373037666339356638353833663233303064
64396563346530303230613137613133346264656639363535323839663634346663306364633033
31303764313764636634633737353636363230623762313961323333373630616561656234366234
66656633303263386430333432623030343237393031383132653366396364316632336362303066
66316530313132663332353734643961393761663462613836666339376261316137343435353861
64336263663733313162353632376137333539353539626336363636643332376232333964386465
32656163316266383930393236656236663763376439303264626437626333323038323939356635
64633065653637343337356138326436653134643361363661613163626663363637356165353664
35383362363434616339373833353739346264316264646465313430303462393565643737633163
38333533623562353637373465356236373433626235306264636161333331366465616566343861
31356334376436383535303966343538383133623530653461343465383831333162383139373963
65336137356636353733373931353132393738633462303165653331646164333633353561326635
30653163656662393739316434373237633237636564646566613234303238656335373437336561
61633335343039383339666437383466386334313366643835306233313834303232316262313231
61633536616637373037343235333038346532633165396365626564616261323838616431336537
33643337326332646365346666313234333330393364636636393036393361623633613962393839
34653963316130306338656634306237356537663964376263303862386630663438343365656238
61643061653661326433326635613831393964636265626265653663373736636237393832663637
64303830653566306362643663643737303231363831356133383964376534393165383033396262
33613331643264646362643537393461393365633137343730633738666561353336656166336536
35346162306332396336623339303166343764633162356466653564306235343363373738383235
34366437633734383035613737616165636334316333643430666138333630336166653063623538
61393332346634396130316436646565653565626338306238653832633561393264356633613337
35313365343739316564656338373665343131663439386537303333623939646133316163646265
36623239663439326431346138643735653862333631313632613038656332336139393863303238
34373037356231653863303261386164666464323465623739313636666265316430383234343134
63663937353335663438333163616536326563393338333065333364393937626439303430313034
38623634663831643061613734613166333836356439333637383537623261373266333535323666
36333837313164336132646262613166343666366531623337316163386230373230323531326438
30373566646462316539393663373931363138636630353436313133643966396439646535356265
30376230633965313862303833373237336163656233623938663331633663343439666638636333
32363361636338343631373562383332303465316533633833336665386663636565323064633562
36653066346339343262303233356362303064626532636538346438326238343938623436343834
30616464316237653938396239313930313030633465363062366331343238333135306361393763
38323466316165363034366134623663373662613939303137373865663463323161636236313836
36363566626431663132306135393066383938346234653038633732343664333639646439313635
61626130623635313066393639666132316334306639363730643963323438663735636137376365
31343834626539316139633235663966643235393666646237353538306361383432313338663133
63346431323230636230346339316661613835636339653966303165376231623330323364383736
34626261343730653337393232373936343931623361653133633163353563623730
31356166336164333662316362396330383564373862663239636363616162643462366436366331
3163353161653833646137306463363961396662663434350a383366613665366530646234343963
38386463396563326532663830336163346564656564616361623733663630383331386362316135
3832646135643262660a386134386566623239323265346236363537303232373062336635646631
31343236313037333339363439353830313164303337353637613662303038663838323133633532
65386436326631623833646433626131663733653839616331666631323632306264356265363236
62366430386332613262363162366466356535613636333033646465663436386162383061386162
34303833326565393866663331316339663633353635656162346435396666626339306330383731
32363762623038306237656336663133366331633136663532373164353162643965663136653861
38363232643534633565323964313335633464666466343564663338383137323836316339366166
65376432643230353561326430643137383962623566383935363934623762613562353932656366
61353133303230616436343065393033303663373733376132653336336564616566323634656231
32663564376162323038386535356635343336653830303862303834646637323530393462366236
66653737623334656333373533373662646132386632353438323238323137353963346133353036
31356266353136386639303664376339313564336262633165333730306136306533653961363935
34323830323262376264323961313132303332313237653434396233363261393961396563376665
38663332306662616438303263316637303935323538643262633564643664653433326130303134
61636436666232633363383031353235373231316563616364633465616163343161633230643664
37633131663436313834343863346565326465613636303336343335643931666566353034613234
62313939336237623933376633313434633634626436646432343936313834356261343164306466
66306364316632653862643665633939346666626339396466373532303536353733363835633031
66353738326132323436613736653865386136323565326538353334386637333433636631303532
64343065383533656239343763366362363732303032376462343438633466366630373738643362
65386439326638386332353830383430376432633039316564626333666236396631386639616262
34373931363934653766623362303338653631336363636365333937386563306132373433366539
39336537633839643662633934316564306639646439313337326631616662323265633066663364
62663136303438353432346237383230373732393465353537636164376263666634386130623837
35643238666231386165656439363263356235313935316465613562346639353539653662653731
34316636666639333864376563663333353266353539373030373935636336333333386531366338
37333731373037313663323236396461616261306238666362313838303437323036396634343534
65313335376636323531613536626634343538666266356363333866333764343033636433346533
31306235316531653537386431326233396231623332316638393531616461336232663830346633
62643638333734636633616364663865363533323031333232666262613336636334636432636339
63616233303239656638383133666566623836393037343066366162626637653930333232326236
36646565323834326136306139323030636639653838356163323161333663373534613063373734
63313638323639386330656630393562336631326235383935633333653465303230393636373235
63616335656161623733356133633635383032666332323434653133376634336632643764343234
65653766313833366638613539623861326261613939386131663061373239326635616663363736
38306636363861333165343832363731373036316639313234393738666538373866303833626262
37626431353038366265306539623637333534303564303234393038633930643032616235643833
64623335386532373437633732323661303439383265386365333830396331366264613365343934
31616566626562333864646466363238366337393962626237353435356430333066626638316136
33643538613065616161336532343530643139343839643461316364376336633938343062613930
30366466646365356338346134373839316238363939663966636563356437343666616632363362
30343635633033343434313466363635313136323665306135373263316261356232306164613834
65353561306465393265306138613961356364356666663233396137363834616164346434653034
32363339323363626636613436666162663730316239636166303932623639616233646239336166
34353331396162626438653434373032306538613464323032616235623562636534373534363034
34656234613564653739623936356539613236623239333832353963363838326263313939383634
64376262663035623030663665353838376531663061646663373437393237373232313865326130
38346531303432373139336636313233333736373862323130653430333736366464653463376136
32666565353961346237626234373533613730636262363864353962643631643537353161643835
39396664663065323538376337336565386239666439663463363233363532616636
38 changes: 19 additions & 19 deletions local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,45 +29,45 @@
hosts: all
tags:
- base
- light-workstation
- heavy-workstation
- samsung-expert
- light_workstation
- heavy_workstation
- samsung_expert
- work
- server
become: true
roles:
- base

- name: Light-workstation Role | Run light-workstation role
hosts: light-workstation
- name: Light_workstation Role | Run light_workstation role
hosts: light_workstation
tags:
- light-workstation
- heavy-workstation
- samsung-expert
- light_workstation
- heavy_workstation
- samsung_expert
roles:
- light-workstation
- light_workstation

- name: Heavy-workstation Role | Run heavy-workstation role
hosts: heavy-workstation
- name: Heavy_workstation Role | Run heavy_workstation role
hosts: heavy_workstation
tags:
- heavy-workstation
- samsung-expert
- heavy_workstation
- samsung_expert
roles:
- heavy-workstation
- heavy_workstation

- name: Work Role | Run work role
hosts: work
tags:
- work
- samsung-expert
- samsung_expert
roles:
- work

- name: Samsung-expert Role | Run samsung-expert role
hosts: samsung-expert
tags: samsung-expert
- name: Samsung_expert Role | Run samsung_expert role
hosts: samsung_expert
tags: samsung_expert
roles:
- samsung-expert
- samsung_expert

- name: Server Role | Run server role
hosts: server
Expand Down
2 changes: 1 addition & 1 deletion roles/base/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
tags:
- network
- netbook
- samsung-expert
- samsung_expert
- aur

- name: Base | Include tasks from tailscale play
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Install insync
- name: Insync | Install insync
tags:
- insync
kewlfft.aur.aur:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Uninstall iptables so it can install iptables-nft later
- name: Libvirt | Uninstall iptables so it can install iptables-nft later
tags:
- libvirt
ansible.builtin.package:
Expand All @@ -9,7 +9,7 @@
force: true
become: true

- name: Install KVM/QEMU packages
- name: Libvirt | Install KVM/QEMU packages
tags:
- libvirt
ansible.builtin.package:
Expand All @@ -25,15 +25,15 @@
become: true
register: "finish_libvirt_configuration1"

- name: Ensure group libvirt exists
- name: Libvirt | Ensure group libvirt exists
tags:
- libvirt
ansible.builtin.group:
name: libvirtd
state: present
become: true

- name: Add to the libvirt group the user {{ lookup('env', 'USER') }}
- name: Libvirt | Add to the libvirt group the user {{ lookup('env', 'USER') }}
tags:
- libvirt
ansible.builtin.user:
Expand All @@ -43,7 +43,7 @@
become: true
register: "finish_libvirt_configuration2"

- name: Copy file qemu.conf to /etc/libvirt
- name: Libvirt | Copy file qemu.conf to /etc/libvirt
tags:
- libvirt
ansible.builtin.copy:
Expand All @@ -55,7 +55,7 @@
become: true
register: "finish_libvirt_configuration3"

- name: Ensure libvirt directory exists in .config
- name: Libvirt | Ensure libvirt directory exists in .config
tags:
- libvirt
ansible.builtin.file:
Expand All @@ -65,7 +65,7 @@
owner: "{{ lookup('env', 'USER') }}"
state: directory

- name: Copy libvirt conf to user .config directory
- name: Libvirt | Copy libvirt conf to user .config directory
tags:
- libvirt
ansible.builtin.copy:
Expand All @@ -74,7 +74,7 @@
mode: '0644'
become: true

- name: Change libvirt.conf to allow non root user to start a VM
- name: Libvirt | Change libvirt.conf to allow non root user to start a VM
tags:
- libvirt
ansible.builtin.lineinfile:
Expand All @@ -83,7 +83,7 @@
line: 'uri_default = "qemu:///system"'
become: true

- name: Restart libvirt
- name: Libvirt | Restart libvirt
tags:
- libvirt
ansible.builtin.service:
Expand All @@ -93,7 +93,7 @@
become: true
when: finish_libvirt_configuration1 is changed or finish_libvirt_configuration2 is changed or finish_libvirt_configuration3 is changed

# - name: virsh start
# - name: Libvirt | virsh start
# tags:
# - libvirt
# ansible.builtin.command: "virsh net-autostart default && virsh net-start default"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: (Syncthing) Install syncthing package
- name: Syncthing | Install syncthing package
tags:
- syncthing
ansible.builtin.package:
Expand All @@ -9,7 +9,7 @@
update_cache: true
become: true

- name: (Syncthing) Copy ufw syncthing rule file
- name: Syncthing | Copy ufw syncthing rule file
tags:
- syncthing
ansible.builtin.copy:
Expand All @@ -20,15 +20,15 @@
mode: '0644'
become: true

- name: (Syncthing) Allow syncthing in ufw
- name: Syncthing | Allow syncthing in ufw
tags:
- syncthing
community.general.ufw:
rule: allow
name: syncthing
become: true

- name: (Syncthing) Copy syncthing systemd file
- name: Syncthing | Copy syncthing systemd file
tags:
- syncthing
ansible.builtin.copy:
Expand All @@ -39,7 +39,7 @@
mode: '0644'
become: true

- name: Ensure syncthing directory exists
- name: Syncthing | Ensure syncthing directory exists
tags:
- syncthing
ansible.builtin.file:
Expand All @@ -49,7 +49,7 @@
owner: "{{ lookup('env', 'USER') }}"
state: directory

- name: (Syncthing) Copy syncthing config file
- name: Syncthing | Copy syncthing config file
tags:
- syncthing
ansible.builtin.copy:
Expand All @@ -60,7 +60,7 @@
mode: '0600'
become: true

- name: (Syncthing) Start syncthing
- name: Syncthing | Start syncthing
tags:
- syncthing
ansible.builtin.systemd:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure windows-docker directory exists
- name: Windows VM | Ensure windows-docker directory exists
tags:
- windows-vm
ansible.builtin.file:
Expand All @@ -9,7 +9,7 @@
owner: "{{ lookup('env', 'USER') }}"
state: directory

- name: Clone windows_docker repo
- name: Windows VM | Clone windows_docker repo
tags:
- windows-vm
ansible.builtin.git:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit e6aeb77

Please sign in to comment.