Skip to content

Commit cb91b99

Browse files
committed
Ingest standard saltstack-formula content
Create flux-cli directory-tree conntent by 1. Cloning the git@github.com:saltstack-formulas/template-formula.git to a temporary location 2. Running the template-formula's bin/convert-formula.sh script to create the flux-cli directory-tree 3. Import the flux-cli directory-tree into the root of this project-space 4. Nuke the saltstack-formulas/template-formula.git content from its temporary location
1 parent f0bb87e commit cb91b99

49 files changed

Lines changed: 1346 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## flux-cd-formula
1+
## flux-cli-formula
22

33
All notable changes to this project will be documented in this file.
44

flux-cli/_mapdata/_mapdata.jinja

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# yamllint disable rule:indentation rule:line-length
2+
# {{ grains.get("osfinger", grains.os) }}
3+
---
4+
{#- use salt.slsutil.serialize to avoid encoding errors on some platforms #}
5+
{{ salt["slsutil.serialize"](
6+
"yaml",
7+
map,
8+
default_flow_style=False,
9+
allow_unicode=True,
10+
)
11+
| regex_replace("^\s+'$", "'", multiline=True)
12+
| trim
13+
}}

flux-cli/_mapdata/init.sls

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
---
4+
{#- Get the `tplroot` from `tpldir` #}
5+
{%- set tplroot = tpldir.split("/")[0] %}
6+
{%- from tplroot ~ "/map.jinja" import mapdata with context %}
7+
8+
{%- set _mapdata = {
9+
"values": mapdata,
10+
} %}
11+
{%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %}
12+
13+
{%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %}
14+
{%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %}
15+
16+
{{ tplroot }}-mapdata-dump:
17+
file.managed:
18+
- name: {{ output_file }}
19+
- source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
20+
- template: jinja
21+
- context:
22+
map: {{ _mapdata | yaml }}

flux-cli/clean.sls

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
include:
5+
- .subcomponent.clean
6+
- .service.clean
7+
- .config.clean
8+
- .package.clean

flux-cli/config/clean.sls

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
{#- Get the `tplroot` from `tpldir` #}
5+
{%- set tplroot = tpldir.split('/')[0] %}
6+
{%- set sls_service_clean = tplroot ~ '.service.clean' %}
7+
{%- from tplroot ~ "/map.jinja" import mapdata as flux_cli with context %}
8+
9+
include:
10+
- {{ sls_service_clean }}
11+
12+
flux-cli-config-clean-file-absent:
13+
file.absent:
14+
- name: {{ flux_cli.config }}
15+
- require:
16+
- sls: {{ sls_service_clean }}

flux-cli/config/file.sls

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
{#- Get the `tplroot` from `tpldir` #}
5+
{%- set tplroot = tpldir.split('/')[0] %}
6+
{%- set sls_package_install = tplroot ~ '.package.install' %}
7+
{%- from tplroot ~ "/map.jinja" import mapdata as flux_cli with context %}
8+
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
9+
10+
include:
11+
- {{ sls_package_install }}
12+
13+
flux-cli-config-file-file-managed:
14+
file.managed:
15+
- name: {{ flux_cli.config }}
16+
- source: {{ files_switch(['example.tmpl'],
17+
lookup='flux-cli-config-file-file-managed'
18+
)
19+
}}
20+
- mode: 644
21+
- user: root
22+
- group: {{ flux_cli.rootgroup }}
23+
- makedirs: True
24+
- template: jinja
25+
- require:
26+
- sls: {{ sls_package_install }}
27+
- context:
28+
flux_cli: {{ flux_cli | json }}

flux-cli/config/init.sls

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
include:
5+
- .file
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
########################################################################
2+
# File managed by Salt at <{{ source }}>.
3+
# Your changes will be overwritten.
4+
########################################################################
5+
6+
This is an example file from SaltStack template-formula.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
########################################################################
2+
# File managed by Salt at <{{ source }}>.
3+
# Your changes will be overwritten.
4+
########################################################################
5+
6+
This is another example file from SaltStack template-formula.
7+
8+
# This is here for testing purposes
9+
{{ flux__cd | json }}
10+
11+
winner of the merge: {{ flux__cd['winner'] }}

flux-cli/init.sls

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
include:
5+
- .package
6+
- .config
7+
- .service
8+
- .subcomponent

0 commit comments

Comments
 (0)