From f266ceb3d66a04fe4a8d642368a854ce036391ff Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Tue, 20 Sep 2022 15:02:53 +0200 Subject: [PATCH] usercfg --- deploy.yml | 8 ++++++++ hosts.yml | 3 +++ roles/usercfg/tasks/main.yml | 8 ++++++++ 3 files changed, 19 insertions(+) create mode 100644 roles/usercfg/tasks/main.yml diff --git a/deploy.yml b/deploy.yml index b1d8011..f4e3bc2 100644 --- a/deploy.yml +++ b/deploy.yml @@ -28,6 +28,14 @@ roles: - mounts +- name: usercfg + hosts: + - suricata + become: true + roles: + - usercfg + tags: test + - name: pi_fan_hwpwm hosts: - suricata diff --git a/hosts.yml b/hosts.yml index 7930f2d..2faaf9f 100644 --- a/hosts.yml +++ b/hosts.yml @@ -40,6 +40,9 @@ all: fstype: "none" opts: "bind" passno: "0" + rpi_cfg: + - "enable_uart=1" + - "otg_mode=1" caladan: ansible_host: caladan diff --git a/roles/usercfg/tasks/main.yml b/roles/usercfg/tasks/main.yml new file mode 100644 index 0000000..8e45158 --- /dev/null +++ b/roles/usercfg/tasks/main.yml @@ -0,0 +1,8 @@ +--- + +- name: configure usercfg.txt + lineinfile: + path: /media/mmcblk0p1/usercfg.txt + line: "{{ item }}" + state: present + loop: "{{ rpi_cfg }}"