diff --git a/utils/ansible/README.md b/utils/ansible/README.md index 0b87ccb254..a88917cf96 100644 --- a/utils/ansible/README.md +++ b/utils/ansible/README.md @@ -46,7 +46,7 @@ export SETUP_SCRIPT= # opensuse-setup.yml or rockylinux-setup.yml ansible-playbook -i $TARGET_IP, $SETUP_SCRIPT \ --extra-vars "host=all ansible_user=root ansible_password=$ROOT_PASSWORD \ - testUser=pmdkuser testUserPass=pmdkpass" + new_user=pmdkuser new_user_pass=pmdkpass" ``` **Note**: If the Linux kernel is outdated, `opensuse-setup.yml` and `rockylinux-setup.yml` playbooks will reboot the target platform. @@ -128,7 +128,7 @@ uncomment the following two: and run commands as follows e.g. ```sh export SETUP_SCRIPT= # opensuse-setup.yml or rockylinux-setup.yml -sudo ansible-playbook $SETUP_SCRIPT --extra-vars "ansible_user=pmdkuser" +sudo ansible-playbook $SETUP_SCRIPT --extra-vars "new_user=pmdkuser" ``` **Note**: If a reboot is necessary, as described above, perform it manually and rerun the playbook without in question. @@ -161,12 +161,12 @@ Update playbooks to be used directly on the target as described [above](#provisi and execute: ```sh # as root: -ansible-playbook rockylinux-setup.yml --extra-vars "testUser=pmdkuser testUserPass=pmdkpass" +ansible-playbook rockylinux-setup.yml --extra-vars "new_user=pmdkuser new_user_pass=pmdkpass" # reboot shall be performed only if the playbook requests to do it. reboot # ... cd pmdk/utils/ansible -ansible-playbook rockylinux-setup.yml --extra-vars "testUser=pmdkuser testUserPass=pmdkpass" +ansible-playbook rockylinux-setup.yml --extra-vars "new_user=pmdkuser new_user_pass=pmdkpass" ``` Log in as `pmdkuser` and execute: ```sh @@ -201,12 +201,12 @@ Update playbooks to be used directly on the target as described [above](#provisi and execute: ```sh # as root: -ansible-playbook opensuse-setup.yml --extra-vars "testUser=pmdkuser testUserPass=pmdkpass" +ansible-playbook opensuse-setup.yml --extra-vars "new_user=pmdkuser new_user_pass=pmdkpass" # reboot shall be performed only if the playbook requests to do it. reboot # ... cd pmdk/utils/ansible -ansible-playbook opensuse-setup.yml --extra-vars "testUser=pmdkuser testUserPass=pmdkpass" +ansible-playbook opensuse-setup.yml --extra-vars "new_user=pmdkuser new_user_pass=pmdkpass" ``` Log in as `pmdkuser` and execute: ```sh diff --git a/utils/ansible/configure-pmem.yml b/utils/ansible/configure-pmem.yml index 04f2ae8d68..32c371b5a9 100644 --- a/utils/ansible/configure-pmem.yml +++ b/utils/ansible/configure-pmem.yml @@ -28,7 +28,7 @@ # # 2) locally # For a playbook to be used on a local server please log in as pmdkuser: -# a) comment out the first command: # -hosts: "{{ host }}" +# a) comment out the first command: # - hosts: "{{ host }}" # b) uncomment the next two lines: # - hosts: localhost # connection: local diff --git a/utils/ansible/configure-self-hosted-runner.yml b/utils/ansible/configure-self-hosted-runner.yml index 3f49309401..8c61080c32 100644 --- a/utils/ansible/configure-self-hosted-runner.yml +++ b/utils/ansible/configure-self-hosted-runner.yml @@ -16,7 +16,7 @@ # # 2) locally # For a playbook to be used on a local server please log in as pmdkuser: -# a) comment out the first command: # -hosts: "{{ host }}" +# a) comment out the first command: # - hosts: "{{ host }}" # b) uncomment the next two lines: # - hosts: localhost # connection: local diff --git a/utils/ansible/opensuse-setup.yml b/utils/ansible/opensuse-setup.yml index 45a709e372..12c50d032b 100644 --- a/utils/ansible/opensuse-setup.yml +++ b/utils/ansible/opensuse-setup.yml @@ -6,10 +6,10 @@ # The playbook description and how to use it are available # in the README.md file. # -# Below is an example of how to use this file localy: +# Below is an example of how to use this file locally: # # a) comment out the first command: -# -hosts: "{{ host }}" +# - hosts: "{{ host }}" # b) uncomment the next two lines: # - hosts: localhost # connection: local @@ -21,8 +21,8 @@ # - hosts: localhost # connection: local vars: - testUser: null - testUserPass: pmdkpass + new_user: null + new_user_pass: pmdkpass tasks: - name: Update kernel packages @@ -173,8 +173,8 @@ - name: Add new user shell: | #!/usr/bin/env bash - export USER={{ testUser }} - export USERPASS={{ testUserPass }} + export USER={{ new_user }} + export USERPASS={{ new_user_pass }} useradd -m $USER export PFILE=./password echo $USERPASS > $PFILE @@ -184,7 +184,7 @@ sed -i 's/# %wheel/%wheel/g' /etc/sudoers groupadd wheel gpasswd wheel -a $USER - when: testUser != None + when: new_user != None - name: Set variable OS env: diff --git a/utils/ansible/rockylinux-setup.yml b/utils/ansible/rockylinux-setup.yml index 84d0b4a45b..63cde80824 100644 --- a/utils/ansible/rockylinux-setup.yml +++ b/utils/ansible/rockylinux-setup.yml @@ -6,10 +6,10 @@ # The playbook description and how to use it are available # in the README.md file. # -# Below is an example of how to use this file localy: +# Below is an example of how to use this file locally: # # a) comment out the first command: -# -hosts: "{{ host }}" +# - hosts: "{{ host }}" # b) uncomment the next two lines: # - hosts: localhost # connection: local @@ -21,8 +21,8 @@ # - hosts: localhost # connection: local vars: - testUser: null - testUserPass: pmdkpass + new_user: null + new_user_pass: pmdkpass tasks: - name: Update kernel packages @@ -168,13 +168,13 @@ - name: Add new user shell: | #!/usr/bin/env bash - export USER={{ testUser }} - export USERPASS={{ testUserPass }} + export USER={{ new_user }} + export USERPASS={{ new_user_pass }} useradd -m $USER echo $USERPASS | passwd $USER --stdin gpasswd wheel -a $USER echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - when: testUser != none + when: new_user != none - name: Set variable OS env: