53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
- name: "Server Setup"
|
|
hosts: localhost
|
|
connection: local
|
|
|
|
tasks:
|
|
|
|
- name: "Install base packages"
|
|
package:
|
|
name:
|
|
- openssh
|
|
state: present
|
|
update_cache: true
|
|
|
|
- name: "Run SSH Server"
|
|
service:
|
|
name: sshd
|
|
state: started
|
|
enabled: yes
|
|
|
|
- name: "Sudo: config file"
|
|
copy:
|
|
dest: /etc/sudoers
|
|
src: ./lib/etc/sudoers
|
|
owner: root
|
|
group: root
|
|
mode: 0440
|
|
|
|
- name: "Sudo: Create groups"
|
|
group:
|
|
name: '{{ item }}'
|
|
state: present
|
|
system: true
|
|
with_items:
|
|
- wheel
|
|
- sudo
|
|
|
|
- name: "Pacman configuration"
|
|
when: "'arm' not in ansible_machine"
|
|
copy:
|
|
dest: /etc/pacman.conf
|
|
src: ./lib/etc/pacman.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: "Pacman configuration (ARM)"
|
|
when: "'arm' in ansible_machine"
|
|
copy:
|
|
dest: /etc/pacman.conf
|
|
src: ./lib/etc/pacman.conf.arm
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|