# tasks file for manage_aixtoolbox

- name: gather all aix facts
  aix_facts:
           options:
                  - all

- name: check if perzl
  shell: /usr/bin/yum -q repolist | /usr/bin/grep -q perzl
  register: perzl_repo
  failed_when: false

- name: fail if on perzl repo
  fail: msg="still on perzl"
  when: perzl_repo.rc == 0

- name: backup sudoers file
  copy:
      src: /etc/sudoers
      dest: /etc/sudoers.save
      remote_src: yes
      backup: yes
  failed_when: false

- name: make sure packages directory exists
  file:
      path: /opt/freeware/lib/rpm/Packages
      state: directory

- name: generate yum conf from template
  template:
         src: yum.conf_71.j2
         dest: /opt/freeware/etc/yum/yum.conf
  when: ansible_facts["oslevel"]["OS_Ver"] == "71"

- name: generate yum conf from template
  template:
         src: yum.conf_72.j2
         dest: /opt/freeware/etc/yum/yum.conf
  when: ansible_facts["oslevel"]["OS_Ver"] == "72"

- name: remove all old repo configs
  file:
      path: /opt/freeware/etc/yum/repos.d/
      state: absent

- name: install common packages
  yum:
     state: present
     name: "{{ package_list }}"
     update_cache: yes
     skip_broken: yes
     allow_downgrade: yes

- name: restore sudoers file
  copy:
      src: /etc/sudoers.save
      dest: /etc/sudoers
      remote_src: yes
  failed_when: false

- name: remove sudoers backup
  file:
      path: /etc/sudoers.save
      state: absent
  failed_when: false




On Monday, May 20, 2019 at 1:36:25 PM UTC+2, Jonathan Lozada De La Matta 
wrote:
>
> looks like you typed an option that's not available. can you share the 
> tasks?
>
> Jonathan Lozada De La Matta on mobile
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/efc8e836-5ad4-4ef4-bcad-a5f084df9121%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to