Improve some minor parts of the code
This commit is contained in:
parent
90855de87a
commit
04c8038733
4 changed files with 10 additions and 7 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,5 +1,5 @@
|
|||
cloudflare ddns/ddns_config.ini
|
||||
.vscode
|
||||
.vscode/launch.json
|
||||
.vault_pass
|
||||
.ansible_facts.json
|
||||
__pycache__
|
||||
|
|
|
|||
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"ansible.python.interpreterPath": "/home/thomas/python_venv/bin/python",
|
||||
"files.associations": {
|
||||
"*.yml": "ansible"
|
||||
}
|
||||
}
|
||||
|
|
@ -26,8 +26,6 @@
|
|||
ssh_allow_users: 'thomas'
|
||||
ssh_client_port: 22 # Default, but duplicated here for documentation purpose. Not changed because its only accessible via LAN.
|
||||
ssh_client_password_login: false # Default, but duplicated here for documentation purpose.
|
||||
# Default for the "singleplatform-eng.users" role.
|
||||
users_default_shell: '/usr/bin/zsh'
|
||||
tasks:
|
||||
# This task can be handy for debugging gathered facts, uncomment it if necessary:
|
||||
# - name: Store gathered facts in local file
|
||||
|
|
@ -36,7 +34,6 @@
|
|||
# dest: './.ansible_facts.json'
|
||||
# content: "{{ ansible_facts }}"
|
||||
# mode: "0600"
|
||||
# TODO: Replace this with setup that sets up unnattended updates on the machine itself.
|
||||
- name: Configure hostname
|
||||
become: true
|
||||
ansible.builtin.hostname:
|
||||
|
|
@ -46,6 +43,7 @@
|
|||
ansible.builtin.lineinfile:
|
||||
path: /etc/hosts
|
||||
line: "{{ ansible_facts['default_ipv4']['address'] }} {{ hostname }}.kleinendorst.info {{ hostname }}"
|
||||
# TODO: Replace this with setup that sets up unnattended updates on the machine itself.
|
||||
- name: Update all packages to their latest version # noqa: package-latest
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
- include_vars: vault.yml
|
||||
# TODO: Configure ZSH correctly by reasusing the zsh role by running the commands as the new user.
|
||||
# see: https://serverfault.com/questions/662443/running-ansible-task-as-a-specific-user
|
||||
- name: Read local vault
|
||||
ansible.builtin.include_vars: vault.yml
|
||||
- name: Create a new user
|
||||
ansible.builtin.include_role:
|
||||
name: user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue