play book execution error

16 views
Skip to first unread message

A

unread,
Aug 10, 2020, 11:49:56 AM8/10/20
to Ansible Project
Hi Mates, I am getting below error while executing playbook for a new server that needs to be added .

TASK [krb5_workstation : install krb5_workstation package from rhel-x86_64-server-7-datacenter] *******************************************************************************************************************************************
Monday 10 August 2020  11:19:22 -0400 (0:00:00.128)       0:01:14.829 *********
fatal: [hsdmqa08]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'krb5_workstation_package_name7' is undefined\n\nThe error appears to have been in '/opt/hd/sh/srv/ansible/development/axs8u3p/hadoop/roles/krb5_workstation/tasks/main.yml': line 9, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: install krb5_workstation package from rhel-x86_64-server-7-datacenter\n  ^ here\n"}

Please find the main.yml below.

---
# krb5_workstation role

- name: RedHat unlock krb5 version
  command: yum versionlock delete '{{krb5_workstation_yumlock_version7}}'
  when: ansible_distribution_major_version == "7"
  ignore_errors: yes

- name: install krb5_workstation package from rhel-x86_64-server-7-datacenter
  package:
    name: "{{krb5_workstation_package_name7}}"
    state: present
  when: ansible_distribution_major_version == "7"


- name: RedHat lock krb5_workstation  version 7
  command: yum versionlock add '{{krb5_workstation_package_name7}}'
  when: ansible_distribution_major_version == "7"

# install conf file
- name: deploy /etc/hue/conf/krb5.conf
  copy:
    src: "etc/krb5.conf.{{ lcp }}"
    dest: /etc/krb5.conf
    owner: root
    group: root
    mode: 0755

Stefan Hornburg (Racke)

unread,
Aug 10, 2020, 12:24:25 PM8/10/20
to ansible...@googlegroups.com
On 8/10/20 5:49 PM, A wrote:
> Hi Mates, I am getting below error while executing playbook for a new server that needs to be added .
>
> TASK [krb5_workstation : install krb5_workstation package from rhel-x86_64-server-7-datacenter]
> *******************************************************************************************************************************************
> Monday 10 August 2020  11:19:22 -0400 (0:00:00.128)       0:01:14.829 *********
> fatal: [hsdmqa08]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was:
> 'krb5_workstation_package_name7' is undefined\n\nThe error appears to have been in
> '/opt/hd/sh/srv/ansible/development/axs8u3p/hadoop/roles/krb5_workstation/tasks/main.yml': line 9, column 3, but may\nbe
> elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: install
> krb5_workstation package from rhel-x86_64-server-7-datacenter\n  ^ here\n"}
>
> Please find the main.yml below.

Apparently the variable krb5_workstation_package_name7 is not defined. Check if there is a typo in the variable name.

Regards
Racke

>
> ---
> # krb5_workstation role
>
> - name: RedHat unlock krb5 version
>   command: yum versionlock delete '{{krb5_workstation_yumlock_version7}}'
>   when: ansible_distribution_major_version == "7"
>   ignore_errors: yes
>
> - name: install krb5_workstation package from rhel-x86_64-server-7-datacenter
>   package:
>     name: "{{krb5_workstation_package_name7}}"
>     state: present
>   when: ansible_distribution_major_version == "7"
>
>
> - name: RedHat lock krb5_workstation  version 7
>   command: yum versionlock add '{{krb5_workstation_package_name7}}'
>   when: ansible_distribution_major_version == "7"
>
> # install conf file
> - name: deploy /etc/hue/conf/krb5.conf
>   copy:
>     src: "etc/krb5.conf.{{ lcp }}"
>     dest: /etc/krb5.conf
>     owner: root
>     group: root
>     mode: 0755
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/4453d673-63c3-41f6-baae-6344fd4d7934o%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/4453d673-63c3-41f6-baae-6344fd4d7934o%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

signature.asc
Reply all
Reply to author
Forward
0 new messages