Skip to content

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

Description

@PaSharks9

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions