---
  - name: install the latest versions of software
    yum: name=* update_cache=yes state=latest

  - name: install additional packages
    yum: pkg={{ item }}
         state=present
    with_items:
      - tuned
      - policycoreutils-python
      - python2-pip

  - name: install katello-agent
    when: inventory_hostname == "satellite.atgreen.org"
    copy: src=zabbix.repo dest=/etc/yum.repos.d/zabbix.repo

  - name: install katello-agent
    yum: pkg=katello-agent
         state=present

  - name: install additional satellite packages
    when: inventory_hostname == "satellite.atgreen.org"
    yum: pkg={{ item }}
         state=present
    with_items:
      - puppet-foreman_scap_client

  - name: pip install zabbix-api
    pip: name=zabbix-api

---
  - name: refresh subscription info
    command: subscription-manager refresh

  - name: install the latest versions of software
    yum: name=* update_cache=yes state=latest

  - name: install additional packages
    yum: pkg={{ item }}
         state=present
    with_items:
      - tuned
      - policycoreutils-python
      - python2-pip

  - name: install katello-agent
    when: inventory_hostname == "satellite.atgreen.org"
    copy: src=zabbix.repo dest=/etc/yum.repos.d/zabbix.repo

  - name: install katello-agent
    yum: pkg=katello-agent
         state=present

  - name: install additional satellite packages
    when: inventory_hostname == "satellite.atgreen.org"
    yum: pkg={{ item }}
         state=present
    with_items:
      - puppet-foreman_scap_client

  - name: pip install zabbix-api
    pip: name=zabbix-api

Update subscription info before anything else
Update subscription info before anything else
