Initial commit

This commit is contained in:
Sebastien Thebert committed 2022-10-11 00:08:23 +02:00
1 parent bc40b9d182
commit ff3c016c94
4 files changed
+89

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
# Ansible Role : ubuntu_pro
An Ansible Role that registers host on [Ubuntu Pro](https://ubuntu.com/pro).
## Requirements
Ansible Pro is only available for every Ubuntu LTS releases from 16.04 LTS.
## Roles Variables
The only mandatory variable for this role is `ubuntu_pro_token`.
```yaml
ubuntu_pro_token: <ubuntu_pro_token>
```
## Dependencies
None.
## Example Playbook
`ansible-playbook -i inventory.ini -e ubuntu_pro_token=<your_token> ubuntu_pro.yml`
with `ubuntu_pro.yml` :
```yaml
# ubuntu_pro.yml
- hosts: ubuntu_servers
roles:
- sebthebert.ubuntu_pro
```
## License
MIT / BSD
## Author Information
This role was created in October 2022 by [Sebastien Thebert](https://github.com/sebthebert).
+13
View File
@@ -0,0 +1,13 @@
---
argument_specs:
main:
short_description: Register host on Ubuntu Pro (https://ubuntu.com/pro)
description:
- The main entry point just combines the repositories and packages
entry points.
options:
ubuntu_pro_token:
description:
- Ubuntu Pro token
type: str
required: true
+18
View File
@@ -0,0 +1,18 @@
---
galaxy_info:
role_name: ubuntu_pro
author: sebthebert
description: Register host on Ubuntu Pro
issue_tracker_url: https://github.com/sebthebert/ansible-role-ubuntu_pro/issues
license: "license (BSD, MIT)"
min_ansible_version: "2.11"
platforms:
- name: Ubuntu
versions:
- all
galaxy_tags:
- system
- ubuntu
- ubuntu-pro
dependencies: []
+16
View File
@@ -0,0 +1,16 @@
---
- name: Launch 'apt update'
ansible.builtin.apt:
update_cache: yes
- name: Launch 'apt upgrade'
ansible.builtin.apt:
upgrade: yes
- name: Register this host on Ubuntu Pro (pro attach <token>)
command: pro attach {{ ubuntu_pro_token }}
become: yes
register: reg_pro_attach
- debug:
var: reg_pro_attach