55 lines
1.9 KiB
YAML
55 lines
1.9 KiB
YAML
---
|
|
# tasks file for ansible-manager
|
|
- name: update cache
|
|
pacman:
|
|
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 ansible program
|
|
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: ['ansible', 'ansible-lint'] # not required. Name or list of names of the packages to install, upgrade, or remove.
|
|
become: yes
|
|
|
|
- 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
|
|
|
|
- aur:
|
|
skip_installed: True
|
|
name: yay
|
|
use: makepkg
|
|
become: yes
|
|
become_user: aur_builder
|
|
|
|
- aur:
|
|
skip_installed: True
|
|
name: ansible-aur-git
|
|
use: yay
|
|
become: yes
|
|
become_user: aur_builder
|
|
|
|
|
|
- git:
|
|
dest: ~/Documents/ansible # required. The path of where the repository should be checked out. This parameter is required, unless C(clone) is set to C(no).
|
|
repo: https://{{ githubuser | urlencode }}:{{ githubpassword | urlencode }}@git.ducamps.win/vincent/ansible.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
|
|
|