diff --git a/playbooks/00_initial_adjustments.yml b/playbooks/00_initial_adjustments.yml index b6eb30a..5272943 100644 --- a/playbooks/00_initial_adjustments.yml +++ b/playbooks/00_initial_adjustments.yml @@ -1,7 +1,9 @@ - hosts: odroid_cluster - name: Run script + name: Initial Adjustments become: true gather_facts: true + vars: + iface: "eth0" tasks: - name: Reconfigure /root/.bashrc ansible.builtin.lineinfile: @@ -29,9 +31,12 @@ - name: Iptables 1 ansible.builtin.command: iptables -F + ignore_errors: yes - name: Iptables 2 ansible.builtin.command: update-alternatives --set iptables /usr/sbin/iptables-legacy + ignore_errors: yes - name: Iptables 3 ansible.builtin.command: - update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \ No newline at end of file + update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy + ignore_errors: yes \ No newline at end of file diff --git a/playbooks/00_test.yml b/playbooks/00_test.yml deleted file mode 100644 index 87b00f9..0000000 --- a/playbooks/00_test.yml +++ /dev/null @@ -1,54 +0,0 @@ -- hosts: odroid_master - name: Install k3s - become: true - tasks: - - name: Install deps... - ansible.builtin.apt: - name: - - python3-pip - - python3-dev - - name: Install bottle python package - ansible.builtin.pip: - name: - - RPLCD - - psutil - - smbus2 - - uptime - - name: Upload led control scripts - ansible.builtin.copy: - src: scripts/lcd_control.py - dest: /usr/bin/lcd_control.py - - name: Upload led control service - ansible.builtin.copy: - src: services/lcd_control.service - dest: /etc/systemd/system/ - - name: Upload led control scripts - ansible.builtin.copy: - src: scripts/lcd_control_restart.py - dest: /usr/bin/lcd_control_restart.py - - name: Upload led control service - ansible.builtin.copy: - src: services/lcd_control_restart.service - dest: /etc/systemd/system/ - - name: Upload led control scripts - ansible.builtin.copy: - src: scripts/lcd_control_start.py - dest: /usr/bin/lcd_control_start.py - - name: Upload led control service - ansible.builtin.copy: - src: services/lcd_control_start.service - dest: /etc/systemd/system/ - - name: reload systemctl - ansible.builtin.command: systemctl daemon-reload - - name: Enable service startup lcd_control - ansible.builtin.command: systemctl enable lcd_control.service - - name: Starting service lcd_control - ansible.builtin.command: systemctl start lcd_control.service - - name: Enable service startup lcd_control_restart.service - ansible.builtin.command: systemctl enable lcd_control_restart.service - - name: Enable service startup lcd_control_start.service - ansible.builtin.command: systemctl enable lcd_control_start.service - # - name: Start service lcd_control_restart.service - # ansible.builtin.command: systemctl start lcd_control_restart.service - # - name: start lcd script - # shell: cd /root; nohup python3 lcd_control.py >/dev/null 2>&1 & \ No newline at end of file diff --git a/playbooks/00_tst.yml b/playbooks/00_tst.yml index a04bee8..1e3c949 100644 --- a/playbooks/00_tst.yml +++ b/playbooks/00_tst.yml @@ -3,6 +3,7 @@ vars: ansible_ssh_user: root ansible_ssh_pass: 1234 + #ansible_ssh_pass: odroid myuser: "root" mypassword: "lacijaydee" mypassword2: "lacijaydee" @@ -44,4 +45,5 @@ ansible.builtin.lineinfile: path: /boot/armbianEnv.txt line: "disp_mode=800x480" + diff --git a/playbooks/05_install_docker.yml b/playbooks/05_install_docker.yml index 7d9136e..cf3f12f 100644 --- a/playbooks/05_install_docker.yml +++ b/playbooks/05_install_docker.yml @@ -24,10 +24,3 @@ name: - python3-pip - python3-dev - - name: Install bottle python package - ansible.builtin.pip: - name: - - RPLCD - - psutil - - smbus2 - - uptime diff --git a/playbooks/70_install_k3s.yml b/playbooks/70_install_k3s.yml index afc6589..1631e5a 100644 --- a/playbooks/70_install_k3s.yml +++ b/playbooks/70_install_k3s.yml @@ -4,7 +4,7 @@ tasks: - name: Install K3S ansible.builtin.shell: 'curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" INSTALL_K3S_VERSION="v1.24.1+k3s1" sh -s -' - changed_when: false + #changed_when: false - name: Get token ansible.builtin.command: 'cat /var/lib/rancher/k3s/server/node-token' register: k3s_token diff --git a/playbooks/80_change_logo.yml b/playbooks/80_change_logo.yml index 9e77d22..823cb6c 100644 --- a/playbooks/80_change_logo.yml +++ b/playbooks/80_change_logo.yml @@ -7,4 +7,5 @@ ansible.builtin.lineinfile: path: /etc/update-motd.d/10-armbian-header regexp: "(^#|^)TERM=" - line: "TERM=linux toilet -f standard -F metal $(hostname)" \ No newline at end of file + line: "TERM=linux toilet -f standard -F metal $(hostname)" + ignore_errors: yes \ No newline at end of file diff --git a/playbooks/99_complete_install.yml b/playbooks/99_complete_install.yml index ec16363..da5ac5d 100644 --- a/playbooks/99_complete_install.yml +++ b/playbooks/99_complete_install.yml @@ -5,8 +5,10 @@ import_playbook: 00_initial_adjustments.yml - name: Apt update import_playbook: 00_apt_upgrade.yml +- name: Check for reboot + import_playbook: 00_check_for_reboot.yml - name: Activate display - import_playbook: 00_test.yml + import_playbook: 00_setup_display.yml - name: Install LDAP import_playbook: 00_install_ldap_client.yml - name: Install Docker diff --git a/secret_file.enc b/secret_file.enc new file mode 100644 index 0000000..1f40989 --- /dev/null +++ b/secret_file.enc @@ -0,0 +1,11 @@ +$ANSIBLE_VAULT;1.1;AES256 +33343363623137326437656232643666383064323636623365383763626162383834333630666631 +6534343635316130626634646532643538323530633964340a633862393936623733656333353134 +66656332626238326262656438623631313638306465646261663636643966346433336661373037 +3165326232333339360a653565646362326337653235316238626364616633643136376239663265 +39323133333364373536313733363939363530353161303837333832326135396531343162363235 +37656263313031613037653636653831636165656239343331373462303130626365613563336430 +37663462343031626664633030363233343632303230643263653761363132626133353034316264 +65386166353037396365626162633937333165396332623638313462656361366537396263363166 +62306231386364363133366465663734313236653636303062333565313732326330386265636438 +3464323564393233363462353737623466653165613033336134