mudler / yip

:pushpin: Yaml Instructions Processor - Simply applies a cloud-init style yaml file to the system
Apache License 2.0
73 stars 20 forks source link

Cannot use Cloud-Init or YIP modules to set Keyboard Layout #169

Open PaSharks9 opened 3 months ago

PaSharks9 commented 3 months ago

I'm trying to use the cloud-config (following the doc) to boot and configure my edge-node with KairOS.

What in this case I would like to do, is to use cloud-config file to preconfigure the keyboard language. To do so, i've tried two configuration.

In the first one, i've tried to follow yip documentation, using ' systemd_firstboot' as follow:

cloud-config1.yaml

      # cloud-config

      install: 
        ....

      setup:
          - name: setting up keyboard language
            systemd_firstboot:
              keymap: it

      runcmd:
         ....

      stages:
         ....

Unluckly, this configuration didn't work, but this is not too bad because "systemd_firstboot" should works only for the first boot of the node, while in my use-case i would like to change keyboard layout as needed (with a bash script that update the relevant cloud-config field).

So i've tried another configuration, this time following the 'keyboard' cloud-init module (here) as shown below:

cloud-config.yaml

      #cloud-config

      install:
       .....

      keyboard:
        layout: it

      runcmd:
        ....

      stages:
        ....

Again it didn't work.

In order to accomplish what i would like to do, i'm using the following workaround:

 # cloud-config

 install: 
   ....

 runcmd: 
   ....

 stages:
    network: 
        - name: keyboard Setup
          commands:
            - sudo loadkeys it
        ....

Am i missing something? Am i using the Cloud-Init and yip modules in a wrong way?