Skip to content

Commit

Permalink
backlog
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinth committed Jul 23, 2024
1 parent 397aa6e commit 2ae02b3
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/.master_passwd
/.cert
/roles/files/certs/id_ed25519_ansible
/inventory/group_vars/all.yaml
/ansible.log
/ansible.log
1 change: 1 addition & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ inventory = ./inventory/all.yaml
log_path = ./ansible.log
retry_files_enabled = False
vault_password_file = ./.master_passwd
private_key_file = ./.cert

[connection]
pipelining = True
Expand Down
17 changes: 12 additions & 5 deletions inventory/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ all:
- michal
- paulina
- macadmin
ssh_users:
- michal
- macadmin
linux:
hosts:
dinth-mint:
Expand All @@ -30,29 +33,33 @@ all:
users:
- dinth
- root
ssh_users:
- dinth
- root

servers:
hosts:
r720-omv:
ansible_host: 10.10.1.13
ansible_user: root
ansible_password: "{{ r720_omv_pass }}"
# ansible_password: "{{ r720_omv_pass }}"
rpi-streamdeck:
ansible_host: 10.10.25.41
ansible_user: dinth
ansible_password: "{{ rpi_streamdeck_pass }}"
# ansible_password: "{{ rpi_streamdeck_pass }}"
ansible_become_pass: "{{ rpi_streamdeck_pass }}"
raspberrypi-hyperion:
ansible_host: 10.10.25.20
ansible_user: dinth
ansible_password: "{{ raspberrypi_hyperion_pass }}"
# ansible_password: "{{ raspberrypi_hyperion_pass }}"
ansible_become_pass: "{{ raspberrypi_hyperion_pass }}"
r230-proxmox:
ansible_host: 10.10.1.16
ansible_user: dinth
ansible_password: "{{ r230_proxmox_pass }}"
# ansible_password: "{{ r230_proxmox_pass }}"
ansible_become_pass: "{{ r230_proxmox_pass }}"
vars:
users:
- root
- dinth
ssh_users:
- root
Empty file added roles/configure_ansible.yaml
Empty file.
20 changes: 15 additions & 5 deletions roles/configure_ssh.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
- name: Configure SSH on endpoints

Check failure on line 1 in roles/configure_ssh.yaml

View workflow job for this annotation

GitHub Actions / Ansible Lint

internal-error

Unexpected error code 1 from execution of: ansible-playbook -i localhost, --syntax-check roles/configure_ssh.yaml
hosts: all
vars:
users:
- dinth
- root
tasks:
tasks:
- name: "Deploy public certificates | authorized_keys"

Check warning on line 4 in roles/configure_ssh.yaml

View workflow job for this annotation

GitHub Actions / Ansible Lint

jinja[spacing]

Jinja2 spacing could be improved: {{ ssh_users}} -> {{ ssh_users }}
ansible.posix.authorized_key:
user: "{{ item }}"
state: present
key: https://github.com/dinth.keys
exclusive: true
loop: "{{ ssh_users}}"
- name: "Deploy private certificates | copy"
ansible.builtin.copy:
src:
dest: "/{% if ansible_distrubtion == 'MacOSX' %}Users{% else %}home{% endif %}/"
decrypt: yes

Check failure on line 15 in roles/configure_ssh.yaml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[truthy]

Truthy value should be one of \[false, true]
mode: 0600

Check failure on line 16 in roles/configure_ssh.yaml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[octal-values]

Forbidden implicit octal value "0600"
# when: inventory_hostname in groups['workstations']
2 changes: 1 addition & 1 deletion roles/configure_vim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
- editor
- vi
- vim
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' or ansible_distribution == 'Linux Mint'
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' or ansible_distribution == 'Linux Mint'
6 changes: 6 additions & 0 deletions roles/configure_zsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
path: "~/.oh-my-zsh"
register: oh_my_zsh_stat
loop: "{{ users }}"
- name: Sets ZSH as default shell | user
become: true
ansible.builtin.user:
name: "{{ item }}"
shell: /bin/zsh
loop: "{{ users }}"
- name: Installs Oh My ZSH | shell
become: true
become_user: "{{ item }}"
Expand Down

0 comments on commit 2ae02b3

Please sign in to comment.