Skip to content

Instantly share code, notes, and snippets.

@jlsherrill
Created November 5, 2021 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlsherrill/8c0c2504bf44c5084d6b64da32afda45 to your computer and use it in GitHub Desktop.
Save jlsherrill/8c0c2504bf44c5084d6b64da32afda45 to your computer and use it in GitHub Desktop.
ostree foreman ansible modules example
---
- name: Test Foreman Modules
hosts: localhost
gather_facts: false
collections:
- theforeman.foreman
vars:
validate_certs: "no"
username: "admin"
password: "changeme"
server_url: "https://devel8.markarth.example.com"
tasks:
- name: "create product"
theforeman.foreman.product:
validate_certs: "no"
username: "admin"
password: "changeme"
server_url: "https://devel8.markarth.example.com"
name: "My product"
organization: "Default Organization"
- name: "Create repository"
theforeman.foreman.repository:
name: "My repository"
state: present
content_type: "ostree"
product: "My product"
organization: "Default Organization"
url: "https://fixtures.pulpproject.org/ostree/small/"
mirror_on_sync: true
validate_certs: "no"
username: "admin"
password: "changeme"
server_url: "https://devel8.markarth.example.com"
- name: "Sync repository"
theforeman.foreman.repository_sync:
username: "admin"
password: "changeme"
server_url: "https://devel8.markarth.example.com"
validate_certs: "no"
repository: "My repository"
product: "My product"
organization: "Default Organization"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment