Compare commits

..

No commits in common. "2250c1c093df0063375cddfa1b7d255d2bebf39d" and "33918ccc131cbb369b1aad4f21b6c2046d90619c" have entirely different histories.

11 changed files with 14 additions and 33 deletions

View file

@ -3,10 +3,7 @@
"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"
} }
} }

View file

@ -9,8 +9,6 @@ To install the Ansible playbook, follow these steps:
1. Clone this repository 1. Clone this repository
2. Install Ansible on your system if you haven't already: `sudo apt-get install ansible` 2. Install Ansible on your system if you haven't already: `sudo apt-get install ansible`
3. Move into the repository directory: `cd /path/to/ansible-playbooks` 3. Move into the repository directory: `cd /path/to/ansible-playbooks`
4. Navigate to the repository directory: `cd /path/to/ansible-playbooks`
5. Install required Ansible Galaxy roles using Ansible Galaxy: `ansible-galaxy install -r requirements.yml`
## Usage ## Usage

View file

@ -1,3 +1,3 @@
[defaults] [defaults]
inventory = inventory/hosts inventory = inventory
private_key_file = ~/.ssh/id_rsa private_key_file = ~/.ssh/id_rsa

3
inventory Normal file
View file

@ -0,0 +1,3 @@
10.0.10.4
10.0.10.64
10.0.10.141

View file

@ -1 +0,0 @@
# Debian-specific variables go here

View file

@ -1 +0,0 @@
# OpenWRT-specific variables go here

View file

@ -1 +0,0 @@
# ARMv7 OpenWRT-specific variables for LeRouter-1 go here

View file

@ -1,9 +0,0 @@
[debian]
10.0.10.4
10.0.10.64
10.0.10.141
[openwrt]
10.0.10.1
10.0.10.2
10.0.10.3

View file

@ -1,3 +0,0 @@
- src: https://github.com/gekmihesg/ansible-openwrt.git
scm: git
version: master

View file

@ -1,21 +1,21 @@
--- ---
- hosts: - hosts: all
- debian
# Runs on root user already # Runs on root user already
become: false become: false
tasks: tasks:
- name: Add SSH key to authorized_hosts - Debian - name: Add SSH key to authorized_hosts - Debian/Ubuntu
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 - name: Install packages - Debian/Ubuntu
apt: apt:
name: name:
- vim - vim
@ -29,12 +29,10 @@
- cifs-utils - cifs-utils
- borgbackup - borgbackup
- curl - curl
- syncthing
- socat
- fish
# Cache is already updated from previous step # Cache is already updated from previous step
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

View file

@ -1,6 +1,5 @@
--- ---
- hosts: - hosts: all
- debian
# Runs on root user already # Runs on root user already
become: false become: false
tasks: tasks:
@ -9,6 +8,7 @@
update_cache: true update_cache: true
autoremove: true autoremove: true
state: latest state: latest
when: ansible_distribution in ["Debian"] when: ansible_distribution in ["Debian", "Ubuntu"]
- 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"]