commit a982e2c5f28b47a2c80195e6bfadc1b96ae68007 Author: Morgan McMillian Date: Wed Dec 14 15:31:02 2022 -0800 initial commit for site setup diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..32b7848 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,14 @@ +pipeline { + agent { label "ansible" } + stages { + stage('Execute playbook') { + steps { + ansiblePlaybook( + playbook: 'main.yaml', + inventory: 'inventory.yaml', + credentialsId: 'onedrop-vetinari' + ) + } + } + } +} diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..83a22f5 --- /dev/null +++ b/html/index.html @@ -0,0 +1,13 @@ + + + + + + + mcmillian.us + + + +

morgan.mcmillian.dev

+ + diff --git a/html/style.css b/html/style.css new file mode 100644 index 0000000..3805956 --- /dev/null +++ b/html/style.css @@ -0,0 +1,82 @@ +:root { + --bg: #ffffff; + --fg: #171a1f; + --link: #004cb8; + --active: #006aff; + --pre: #e9ecef; +} + +body { + font-family: sans-serif; + background-color: var(--bg); + color: var(--fg); + padding: 2rem 1.25rem; + line-height: 1.5; + max-width: 600px; + margin: 0; +} + +header { + margin-bottom: 1rem; + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; +} + +header h1 { + font-size: 1.2rem; + margin-top: 0; + margin-bottom: 0; + margin-right: 1rem; +} + +a { + color: var(--link); + position: relative; +} + +a:hover { + color: var(--active); +} + +main h1 { + font-size: 1.6rem; + margin: 0; +} + +h2 { + font-size: 1.35rem; +} + +h3 { + font-size: 1.1rem; +} + +ul { + padding: 0; + list-style: None; +} + +pre { + display: block; + padding: .25rem; + margin: .25rem 0; + overflow-x: auto; + font-size: 1.2em; + background-color: var(--pre); +} + +footer { + margin-top: 2rem; +} + +@media (prefers-color-scheme: dark) { + :root { + --bg: #222222; + --fg: #efefef; + --link: #aaaaaa; + --active: #dddddd; + --pre: #555555; + } +} diff --git a/inventory.yaml b/inventory.yaml new file mode 100644 index 0000000..ca8d905 --- /dev/null +++ b/inventory.yaml @@ -0,0 +1,5 @@ +--- +nodes: + hosts: + vetinari: + ansible_host: vetinari.dreamfall.space diff --git a/main.yaml b/main.yaml new file mode 100644 index 0000000..10ca48e --- /dev/null +++ b/main.yaml @@ -0,0 +1,19 @@ +--- +- name: deploy mcmillian.dev static site + hosts: vetinari + vars: + html_location: /var/www/html/mcmillian.us + + tasks: + - name: ping host + ansible.builtin.ping: + + - name: setup location + ansible.builtin.file: + path: "{{ html_location }}" + state: directory + + - name: sync html directory + ansible.posix.synchronize: + src: html/ + dest: "{{ html_location }}/"