mirror of
https://github.com/lemeow125/ansible-playbooks.git
synced 2024-11-17 04:09:26 +08:00
Update folder structure
This commit is contained in:
parent
ddf67b68a7
commit
2250c1c093
8 changed files with 12 additions and 11 deletions
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
|
@ -3,7 +3,10 @@
|
||||||
"yaml.schemas": {
|
"yaml.schemas": {
|
||||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/playbook": [
|
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/playbook": [
|
||||||
"file:///e%3A/Projects/AnsibleTest/setup.yml",
|
"file:///e%3A/Projects/AnsibleTest/setup.yml",
|
||||||
"file:///e%3A/Projects/AnsibleTest/update.yml"
|
"file:///e%3A/Projects/AnsibleTest/update.yml",
|
||||||
]
|
"file:///e%3A/Projects/ansible-playbooks/roles/tasks/update.yml",
|
||||||
|
"file:///e%3A/Projects/ansible-playbooks/roles/tasks/setup.yml"
|
||||||
|
],
|
||||||
|
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/requirements.json": "file:///e%3A/Projects/ansible-playbooks/requirements.yml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[defaults]
|
[defaults]
|
||||||
inventory = inventory
|
inventory = inventory/hosts
|
||||||
private_key_file = ~/.ssh/id_rsa
|
private_key_file = ~/.ssh/id_rsa
|
1
inventory/group_vars/debian.yml
Normal file
1
inventory/group_vars/debian.yml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Debian-specific variables go here
|
1
inventory/group_vars/openwrt.yml
Normal file
1
inventory/group_vars/openwrt.yml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# OpenWRT-specific variables go here
|
1
inventory/host_vars/10.0.10.1.yml
Normal file
1
inventory/host_vars/10.0.10.1.yml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# ARMv7 OpenWRT-specific variables for LeRouter-1 go here
|
|
@ -1,23 +1,21 @@
|
||||||
---
|
---
|
||||||
- hosts:
|
- hosts:
|
||||||
- debian
|
- debian
|
||||||
- ubuntu
|
|
||||||
# Runs on root user already
|
# Runs on root user already
|
||||||
become: false
|
become: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Add SSH key to authorized_hosts - Debian/Ubuntu
|
- name: Add SSH key to authorized_hosts - Debian
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: root
|
user: root
|
||||||
state: present
|
state: present
|
||||||
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
|
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
|
||||||
path: /root/.ssh/authorized_keys
|
path: /root/.ssh/authorized_keys
|
||||||
when: ansible_distribution in ["Debian", "Ubuntu"]
|
|
||||||
- name: Update all packages
|
- name: Update all packages
|
||||||
apt:
|
apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
autoremove: true
|
autoremove: true
|
||||||
state: latest
|
state: latest
|
||||||
- name: Install packages - Debian/Ubuntu
|
- name: Install packages - Debian
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
- vim
|
- vim
|
||||||
|
@ -38,6 +36,5 @@
|
||||||
update_cache: false
|
update_cache: false
|
||||||
autoremove: true
|
autoremove: true
|
||||||
state: latest
|
state: latest
|
||||||
when: ansible_distribution in ["Debian", "Ubuntu"]
|
|
||||||
- name: Install ACME
|
- name: Install ACME
|
||||||
command: curl https://get.acme.sh | sh -s email=noehbernasol0@gmail.com
|
command: curl https://get.acme.sh | sh -s email=noehbernasol0@gmail.com
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
- hosts:
|
- hosts:
|
||||||
- debian
|
- debian
|
||||||
- ubuntu
|
|
||||||
# Runs on root user already
|
# Runs on root user already
|
||||||
become: false
|
become: false
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -10,7 +9,6 @@
|
||||||
update_cache: true
|
update_cache: true
|
||||||
autoremove: true
|
autoremove: true
|
||||||
state: latest
|
state: latest
|
||||||
when: ansible_distribution in ["Debian", "Ubuntu"]
|
when: ansible_distribution in ["Debian"]
|
||||||
- name: Update ACME
|
- name: Update ACME
|
||||||
command: /root/.acme.sh/acme.sh --upgrade --auto-upgrade
|
command: /root/.acme.sh/acme.sh --upgrade --auto-upgrade
|
||||||
when: ansible_distribution in ["Debian", "Ubuntu"]
|
|
Loading…
Reference in a new issue