ansible/playbooks/00_initial_adjustments.yml
2022-12-14 02:23:34 +01:00

42 lines
1.4 KiB
YAML

- hosts: odroid_cluster
name: Run script
become: true
gather_facts: true
tasks:
- name: Reconfigure /root/.bashrc
ansible.builtin.lineinfile:
path: /root/.bashrc
line: "export HISTCONTROL=ignoreboth"
- name: Reconfigure /home/jd/.bashrc
ansible.builtin.lineinfile:
path: /home/jd/.bashrc
line: "export HISTCONTROL=ignoreboth"
- name: Set a hostname
ansible.builtin.hostname:
name: odroidc4-1
when: ansible_eth0.macaddress == "00:1e:06:48:b3:0c"
- name: Set a hostname
ansible.builtin.hostname:
name: odroidc4-2
when: ansible_eth0.macaddress == "00:1e:06:48:cd:86"
- name: Set a hostname
ansible.builtin.hostname:
name: odroidc4-3
when: ansible_eth0.macaddress == "00:1e:06:48:d0:01"
- name: Set a hostname
ansible.builtin.hostname:
name: odroidc4-4
when: ansible_eth0.macaddress == "00:1e:06:48:d0:00"
- name: Set a hostname
ansible.builtin.hostname:
name: odroidc4-5
when: ansible_eth0.macaddress == "00:1e:06:48:cd:8e"
- name: Iptables 1
ansible.builtin.command:
iptables -F
- name: Iptables 2
ansible.builtin.command:
update-alternatives --set iptables /usr/sbin/iptables-legacy
- name: Iptables 3
ansible.builtin.command:
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy