add profile in system ands soft install
This commit is contained in:
parent
8bc03f07a6
commit
e3f07b97b6
@ -0,0 +1 @@
|
|||||||
|
username: user
|
28
tasks/AUR_builder.yml
Normal file
28
tasks/AUR_builder.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
- name: install base-devel package
|
||||||
|
pacman:
|
||||||
|
state: present # not required. choices: absent;latest;present. Desired state of the package.
|
||||||
|
upgrade: false # not required. Whether or not to upgrade whole system.
|
||||||
|
name: ['base-devel'] # not required. Name or list of names of the packages to install, upgrade, or remove.
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: Create aur_builder user
|
||||||
|
user:
|
||||||
|
name: aur_builder
|
||||||
|
group: wheel
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: Allow aur_builder to run pacman as root
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/sudoers.d/11-install-aur_builder
|
||||||
|
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
||||||
|
create: yes
|
||||||
|
validate: 'visudo -cf %s'
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: install yay
|
||||||
|
aur:
|
||||||
|
skip_installed: True
|
||||||
|
name: yay
|
||||||
|
use: makepkg
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
14
tasks/base_software.yml
Normal file
14
tasks/base_software.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
- name: launch base install software
|
||||||
|
pacman:
|
||||||
|
state: present # not required. choices: absent;latest;present. Desired state of the package.
|
||||||
|
name: ['zsh','stow','awesome-terminal-fonts','wget','bat','diff-so-fancy','git','htop','thefuck','tldr','ntfs-3g','tmux','vim','zsh-theme-powerlevel9k' ] # not required. Name or list of names of the packages to install, upgrade, or remove.
|
||||||
|
update_cache: true # not required. Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step.
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: install oh-my-zsh-git
|
||||||
|
aur:
|
||||||
|
skip_installed: True
|
||||||
|
name: oh-my-zsh-git
|
||||||
|
use: yay
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
- include_tasks: AUR_builder.yml
|
||||||
|
- include_tasks: base_software.yml
|
||||||
|
- include_tasks: user_config_file.yml
|
22
tasks/user_config_file.yml
Normal file
22
tasks/user_config_file.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
- name: clone user repository
|
||||||
|
git:
|
||||||
|
dest: ~/conf2 # required. The path of where the repository should be checked out. This parameter is required, unless C(clone) is set to C(no).
|
||||||
|
repo: ssh://git@pi2/vincent/conf2.git # required. git, SSH, or HTTP(S) protocol address of the git repository.
|
||||||
|
clone: yes # not required. If C(no), do not clone the repository if it does not exist locally
|
||||||
|
force: no
|
||||||
|
update: no
|
||||||
|
accept_hostkey: yes
|
||||||
|
|
||||||
|
|
||||||
|
- name: pass user shell to zsh
|
||||||
|
user:
|
||||||
|
name: "{{username}}" # required. Name of the user to create, remove or modify.
|
||||||
|
shell: /bin/zsh # not required. Optionally set the user's shell.,On macOS, before version 2.5, the default shell for non-system users was /usr/bin/false. Since 2.5, the default shell for non-system users on macOS is /bin/bash.
|
||||||
|
state: present # not required. choices: absent;present. Whether the account should exist or not, taking action if the state is different from what is stated.
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: apply stow config
|
||||||
|
shell: stow *
|
||||||
|
args:
|
||||||
|
chdir: ~/conf2
|
||||||
|
creates: "~/.zshrc.d/alias" # not required. a filename, when it already exists, this step will B(not) be run.
|
Loading…
Reference in New Issue
Block a user